diff options
author | Gennadiy Rozental <rogeeff@google.com> | 2023-06-27 17:22:39 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-06-27 17:24:09 -0700 |
commit | d65595c8dd994b47b7fdfdf9427bb546c577467b (patch) | |
tree | b28691c7a8d04c6236dfe9f1b17bf6ac3ca85310 /absl/time/internal/cctz/src/time_zone_libc.h | |
parent | e6c09ae4b2acd421a29706f86e66eaa422262ad0 (diff) | |
download | abseil-d65595c8dd994b47b7fdfdf9427bb546c577467b.tar.gz abseil-d65595c8dd994b47b7fdfdf9427bb546c577467b.tar.bz2 abseil-d65595c8dd994b47b7fdfdf9427bb546c577467b.zip |
Import of CCTZ from GitHub.
PiperOrigin-RevId: 543896343
Change-Id: Ia91b3e082b764b750bbbe9a3ce63192263d51438
Diffstat (limited to 'absl/time/internal/cctz/src/time_zone_libc.h')
-rw-r--r-- | absl/time/internal/cctz/src/time_zone_libc.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/absl/time/internal/cctz/src/time_zone_libc.h b/absl/time/internal/cctz/src/time_zone_libc.h index 1da9039a..2d6fa686 100644 --- a/absl/time/internal/cctz/src/time_zone_libc.h +++ b/absl/time/internal/cctz/src/time_zone_libc.h @@ -27,10 +27,10 @@ namespace cctz { // A time zone backed by gmtime_r(3), localtime_r(3), and mktime(3), // and which therefore only supports UTC and the local time zone. -// TODO: Add support for fixed offsets from UTC. class TimeZoneLibC : public TimeZoneIf { public: - explicit TimeZoneLibC(const std::string& name); + // Factory. + static std::unique_ptr<TimeZoneLibC> Make(const std::string& name); // TimeZoneIf implementations. time_zone::absolute_lookup BreakTime( @@ -44,6 +44,10 @@ class TimeZoneLibC : public TimeZoneIf { std::string Description() const override; private: + explicit TimeZoneLibC(const std::string& name); + TimeZoneLibC(const TimeZoneLibC&) = delete; + TimeZoneLibC& operator=(const TimeZoneLibC&) = delete; + const bool local_; // localtime or UTC }; |