From 17014064a4ea367952eb4a595796f48c688c1467 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Wed, 28 Jun 2023 08:11:49 -0700 Subject: Rollback of CCTZ update due to crash in clang ObjcLink. PiperOrigin-RevId: 544060862 Change-Id: I6ca631385826f6e10f6c3eeec1af532402d0b532 --- absl/time/internal/cctz/src/time_zone_libc.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'absl/time/internal/cctz/src/time_zone_libc.cc') diff --git a/absl/time/internal/cctz/src/time_zone_libc.cc b/absl/time/internal/cctz/src/time_zone_libc.cc index d0146122..e503a858 100644 --- a/absl/time/internal/cctz/src/time_zone_libc.cc +++ b/absl/time/internal/cctz/src/time_zone_libc.cc @@ -62,7 +62,7 @@ auto tm_zone(const std::tm& tm) -> decltype(tzname[0]) { } #elif defined(__native_client__) || defined(__myriad2__) || \ defined(__EMSCRIPTEN__) -// Uses the globals: '_timezone' and 'tzname'. +// Uses the globals: 'timezone' and 'tzname'. auto tm_gmtoff(const std::tm& tm) -> decltype(_timezone + 0) { const bool is_dst = tm.tm_isdst > 0; return _timezone + (is_dst ? 60 * 60 : 0); @@ -193,9 +193,8 @@ std::time_t find_trans(std::time_t lo, std::time_t hi, tm_gmtoff_t offset) { } // namespace -std::unique_ptr TimeZoneLibC::Make(const std::string& name) { - return std::unique_ptr(new TimeZoneLibC(name)); -} +TimeZoneLibC::TimeZoneLibC(const std::string& name) + : local_(name == "localtime") {} time_zone::absolute_lookup TimeZoneLibC::BreakTime( const time_point& tp) const { @@ -324,9 +323,6 @@ std::string TimeZoneLibC::Description() const { return local_ ? "localtime" : "UTC"; } -TimeZoneLibC::TimeZoneLibC(const std::string& name) - : local_(name == "localtime") {} - } // namespace cctz } // namespace time_internal ABSL_NAMESPACE_END -- cgit v1.2.3