From 7b635c031f8e795bd36d70d9559909f3ad6f8c8a Mon Sep 17 00:00:00 2001 From: A1029384756 Date: Thu, 11 Dec 2025 23:13:38 -0500 Subject: [tz_unix] added additional search paths to match musl --- core/time/timezone/tz_unix.odin | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/core/time/timezone/tz_unix.odin b/core/time/timezone/tz_unix.odin index 990e78d41..d940e47be 100644 --- a/core/time/timezone/tz_unix.odin +++ b/core/time/timezone/tz_unix.odin @@ -81,9 +81,15 @@ _region_load :: proc(_reg_str: string, allocator := context.allocator) -> (out_r } defer if _reg_str == "local" { delete(reg_str, allocator) } - db_path := "/usr/share/zoneinfo" - region_path := filepath.join({db_path, reg_str}, allocator) - defer delete(region_path, allocator) + db_paths := []string{"/usr/share/zoneinfo", "/share/zoneinfo", "/etc/zoneinfo"} + for db_path in db_paths { + region_path := filepath.join({db_path, reg_str}, allocator) + defer delete(region_path, allocator) - return load_tzif_file(region_path, reg_str, allocator) + if tz_reg, ok := load_tzif_file(region_path, reg_str, allocator); ok { + return tz_reg, true + } + } + + return nil, false } -- cgit v1.2.3