From af7882601aad93ada881486eeaabc562f1733961 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Mon, 23 Apr 2018 08:17:58 -0700 Subject: - fd5f3d7077270ffc5ea74cdb9e18bbae3b9b46aa Fix typo optional -> variant by Abseil Team - 9136c06dfa8dbfdde0a427ad3509e34763d607a6 Fix string_view_test and str_cat_test build under MSVC de... by Derek Mauro - a463820f9441888f4368aa87328599e3209f9b07 Removes constexpr optional::operator->(). This was don... by Abseil Team - 3bf78a7f126daafff329f7815d507422f1ca378d Remove dependencies on external CCTZ project. by Shaindel Schwartz - a4ae574a11b1ddf6e88459af3d638cf79aea7ecd Internal change by Jon Cohen GitOrigin-RevId: fd5f3d7077270ffc5ea74cdb9e18bbae3b9b46aa Change-Id: I6ab8ab99863716fe9b2745a12ef285f7a6da6d1e --- absl/time/time.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'absl/time/time.h') diff --git a/absl/time/time.h b/absl/time/time.h index 30c49d4..c50d69a 100644 --- a/absl/time/time.h +++ b/absl/time/time.h @@ -64,7 +64,7 @@ #include #include "absl/base/port.h" // Needed for string vs std::string -#include "cctz/time_zone.h" +#include "absl/time/internal/cctz/include/cctz/time_zone.h" namespace absl { @@ -1032,12 +1032,12 @@ std::string UnparseFlag(Time t); // - http://en.wikipedia.org/wiki/Zoneinfo class TimeZone { public: - explicit TimeZone(cctz::time_zone tz) : cz_(tz) {} + explicit TimeZone(time_internal::cctz::time_zone tz) : cz_(tz) {} TimeZone() = default; // UTC, but prefer UTCTimeZone() to be explicit. TimeZone(const TimeZone&) = default; TimeZone& operator=(const TimeZone&) = default; - explicit operator cctz::time_zone() const { return cz_; } + explicit operator time_internal::cctz::time_zone() const { return cz_; } std::string name() const { return cz_.name(); } @@ -1048,7 +1048,7 @@ class TimeZone { return os << tz.name(); } - cctz::time_zone cz_; + time_internal::cctz::time_zone cz_; }; // LoadTimeZone() @@ -1058,11 +1058,11 @@ class TimeZone { // `false` and `*tz` is set to the UTC time zone. inline bool LoadTimeZone(const std::string& name, TimeZone* tz) { if (name == "localtime") { - *tz = TimeZone(cctz::local_time_zone()); + *tz = TimeZone(time_internal::cctz::local_time_zone()); return true; } - cctz::time_zone cz; - const bool b = cctz::load_time_zone(name, &cz); + time_internal::cctz::time_zone cz; + const bool b = time_internal::cctz::load_time_zone(name, &cz); *tz = TimeZone(cz); return b; } @@ -1074,14 +1074,14 @@ inline bool LoadTimeZone(const std::string& name, TimeZone* tz) { // you'll get UTC (i.e., no offset) instead. inline TimeZone FixedTimeZone(int seconds) { return TimeZone( - cctz::fixed_time_zone(std::chrono::seconds(seconds))); + time_internal::cctz::fixed_time_zone(std::chrono::seconds(seconds))); } // UTCTimeZone() // // Convenience method returning the UTC time zone. inline TimeZone UTCTimeZone() { - return TimeZone(cctz::utc_time_zone()); + return TimeZone(time_internal::cctz::utc_time_zone()); } // LocalTimeZone() @@ -1091,7 +1091,7 @@ inline TimeZone UTCTimeZone() { // and particularly so in a server process, as the zone configured for the // local machine should be irrelevant. Prefer an explicit zone name. inline TimeZone LocalTimeZone() { - return TimeZone(cctz::local_time_zone()); + return TimeZone(time_internal::cctz::local_time_zone()); } // ============================================================================ -- cgit v1.2.3