summaryrefslogtreecommitdiff
path: root/absl/time/internal/cctz/src/time_zone_impl.cc
diff options
context:
space:
mode:
authorGravatar Gennadiy Rozental <rogeeff@google.com>2023-06-27 17:22:39 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2023-06-27 17:24:09 -0700
commitd65595c8dd994b47b7fdfdf9427bb546c577467b (patch)
treeb28691c7a8d04c6236dfe9f1b17bf6ac3ca85310 /absl/time/internal/cctz/src/time_zone_impl.cc
parente6c09ae4b2acd421a29706f86e66eaa422262ad0 (diff)
Import of CCTZ from GitHub.
PiperOrigin-RevId: 543896343 Change-Id: Ia91b3e082b764b750bbbe9a3ce63192263d51438
Diffstat (limited to 'absl/time/internal/cctz/src/time_zone_impl.cc')
-rw-r--r--absl/time/internal/cctz/src/time_zone_impl.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/absl/time/internal/cctz/src/time_zone_impl.cc b/absl/time/internal/cctz/src/time_zone_impl.cc
index f34e3aec..aadbb77d 100644
--- a/absl/time/internal/cctz/src/time_zone_impl.cc
+++ b/absl/time/internal/cctz/src/time_zone_impl.cc
@@ -99,11 +99,13 @@ void time_zone::Impl::ClearTimeZoneMapTestOnly() {
}
}
+time_zone::Impl::Impl() : name_("UTC"), zone_(TimeZoneIf::UTC()) {}
+
time_zone::Impl::Impl(const std::string& name)
- : name_(name), zone_(TimeZoneIf::Load(name_)) {}
+ : name_(name), zone_(TimeZoneIf::Make(name_)) {}
const time_zone::Impl* time_zone::Impl::UTCImpl() {
- static const Impl* utc_impl = new Impl("UTC"); // never fails
+ static const Impl* utc_impl = new Impl;
return utc_impl;
}