Skip to content

Commit

Permalink
Add new tzdata path for Android
Browse files Browse the repository at this point in the history
  • Loading branch information
devbww committed Nov 8, 2023
1 parent b6d7a85 commit 88c898a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/time_zone_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,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;
Expand Down

0 comments on commit 88c898a

Please sign in to comment.