summaryrefslogtreecommitdiff
path: root/absl
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2023-11-08 08:13:31 -0800
committerGravatar Copybara-Service <copybara-worker@google.com>2023-11-08 08:14:39 -0800
commit8aff21b705e9071f54db9fb473f782c7ab0a0f3b (patch)
tree8fa679999899eac54c5f9c25a9487f9b6c8a8374 /absl
parent866b0fb56a81af7d5142f60ce331adc2005aa8b6 (diff)
Import of CCTZ from GitHub.
PiperOrigin-RevId: 580538328 Change-Id: I2699c77eeb68708584231d86ae2c0fca4870c17e
Diffstat (limited to 'absl')
-rw-r--r--absl/time/internal/cctz/src/time_zone_info.cc10
1 files changed, 9 insertions, 1 deletions
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<ZoneInfoSource> 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<ZoneInfoSource> 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] == '/');