From 8aff21b705e9071f54db9fb473f782c7ab0a0f3b Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Wed, 8 Nov 2023 08:13:31 -0800 Subject: Import of CCTZ from GitHub. PiperOrigin-RevId: 580538328 Change-Id: I2699c77eeb68708584231d86ae2c0fca4870c17e --- absl/time/internal/cctz/src/time_zone_info.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/absl/time/internal/cctz/src/time_zone_info.cc b/absl/time/internal/cctz/src/time_zone_info.cc index f46198ff..01748708 100644 --- a/absl/time/internal/cctz/src/time_zone_info.cc +++ b/absl/time/internal/cctz/src/time_zone_info.cc @@ -474,7 +474,8 @@ std::unique_ptr AndroidZoneInfoSource::Open( const std::size_t pos = (name.compare(0, 5, "file:") == 0) ? 5 : 0; // See Android's libc/tzcode/bionic.cpp for additional information. - for (const char* tzdata : {"/data/misc/zoneinfo/current/tzdata", + for (const char* tzdata : {"/apex/com.android.tzdata/etc/tz/tzdata", + "/data/misc/zoneinfo/current/tzdata", "/system/usr/share/zoneinfo/tzdata"}) { auto fp = FOpen(tzdata, "rb"); if (fp == nullptr) continue; @@ -539,9 +540,16 @@ std::unique_ptr FuchsiaZoneInfoSource::Open( // Prefixes where a Fuchsia component might find zoneinfo files, // in descending order of preference. const auto kTzdataPrefixes = { + // The tzdata from `config-data`. "/config/data/tzdata/", + // The tzdata bundled in the component's package. "/pkg/data/tzdata/", + // General data storage. "/data/tzdata/", + // The recommended path for routed-in tzdata files. + // See for details: + // https://fuchsia.dev/fuchsia-src/concepts/process/namespaces?hl=en#typical_directory_structure + "/config/tzdata/", }; const auto kEmptyPrefix = {""}; const bool name_absolute = (pos != name.size() && name[pos] == '/'); -- cgit v1.2.3