diff options
author | Pirate Praveen <praveen@debian.org> | 2023-03-06 20:25:41 +0530 |
---|---|---|
committer | Pirate Praveen <praveen@debian.org> | 2023-03-06 20:25:41 +0530 |
commit | 079dd8737bbaaaeeca3a95c2b858a62d8a620d5a (patch) | |
tree | 6af54966e17bcfe48ecdb0b5cdf43cc953d5358c /absl/time/internal/test_util.cc | |
parent | 2bbc47f307f1e24f3f44a108d571bffa5a3faa63 (diff) | |
parent | f5afcb784c9b1c501c1144b7aab84555881ca871 (diff) |
Merge tag '20220623.1-1' into bullseye-backports-staging
Diffstat (limited to 'absl/time/internal/test_util.cc')
-rw-r--r-- | absl/time/internal/test_util.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/absl/time/internal/test_util.cc b/absl/time/internal/test_util.cc index 9a485a07..454b33a1 100644 --- a/absl/time/internal/test_util.cc +++ b/absl/time/internal/test_util.cc @@ -17,6 +17,7 @@ #include <algorithm> #include <cstddef> #include <cstring> +#include <memory> #include "absl/base/config.h" #include "absl/base/internal/raw_logging.h" @@ -67,10 +68,6 @@ const struct ZoneInfo { {"Invalid/TimeZone", nullptr, 0}, {"", nullptr, 0}, - // Also allow for loading the local time zone under TZ=US/Pacific. - {"US/Pacific", // - reinterpret_cast<char*>(America_Los_Angeles), America_Los_Angeles_len}, - // Allows use of the local time zone from a system-specific location. #ifdef _MSC_VER {"localtime", // @@ -114,7 +111,10 @@ std::unique_ptr<cctz::ZoneInfoSource> TestFactory( new TestZoneInfoSource(zoneinfo.data, zoneinfo.length)); } } - ABSL_RAW_LOG(FATAL, "Unexpected time zone \"%s\" in test", name.c_str()); + + // The embedded zoneinfo data does not include the zone, so fallback to + // built-in UTC. The tests have been crafted so that this should only + // happen when testing absl::LocalTimeZone() with an unconstrained ${TZ}. return nullptr; } |