summaryrefslogtreecommitdiff
path: root/absl/time/time.h
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2018-04-23 08:17:58 -0700
committerGravatar Derek Mauro <dmauro@google.com>2018-04-23 12:57:34 -0400
commitaf7882601aad93ada881486eeaabc562f1733961 (patch)
treee9a52b01ef69c7654a97d66c8d60377c851ae817 /absl/time/time.h
parent94ce52d46c171683b1ee22d14277a6d3bdfd7c4c (diff)
- fd5f3d7077270ffc5ea74cdb9e18bbae3b9b46aa Fix typo optional -> variant by Abseil Team <absl-team@google.com>
- 9136c06dfa8dbfdde0a427ad3509e34763d607a6 Fix string_view_test and str_cat_test build under MSVC de... by Derek Mauro <dmauro@google.com> - a463820f9441888f4368aa87328599e3209f9b07 Removes constexpr optional<T>::operator->(). This was don... by Abseil Team <absl-team@google.com> - 3bf78a7f126daafff329f7815d507422f1ca378d Remove dependencies on external CCTZ project. by Shaindel Schwartz <shaindel@google.com> - a4ae574a11b1ddf6e88459af3d638cf79aea7ecd Internal change by Jon Cohen <cohenjon@google.com> GitOrigin-RevId: fd5f3d7077270ffc5ea74cdb9e18bbae3b9b46aa Change-Id: I6ab8ab99863716fe9b2745a12ef285f7a6da6d1e
Diffstat (limited to 'absl/time/time.h')
-rw-r--r--absl/time/time.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/absl/time/time.h b/absl/time/time.h
index 30c49d41..c50d69a5 100644
--- a/absl/time/time.h
+++ b/absl/time/time.h
@@ -64,7 +64,7 @@
#include <utility>
#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());
}
// ============================================================================