canassa opened a new issue, #49351:
URL: https://github.com/apache/arrow/issues/49351

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   The vendored Howard Hinnant date library hardcodes `/usr/share/zoneinfo` as 
the timezone database path in `discover_tz_dir()` 
(`cpp/src/arrow/vendored/datetime/tz.cpp`). It does not check the `TZDIR` 
environment variable, which is the POSIX standard mechanism for overriding this 
path.
   
   This causes timezone operations to fail on non FHS Linux distributions such 
as NixOS, where `zoneinfo` resides under a non standard path like 
`/nix/store/.../share/zoneinfo`.
   
   The upstream library also lacks `TZDIR` support
   
   ### Reproduction
   
   On NixOS without a `TZDIR` patch:
   
   ```python
   import pyarrow as pa
   
   arr = pa.array([1], type=pa.timestamp("s", tz="America/New_York"))
   # Fails: discover_tz_dir failed to find zoneinfo
   ```
   
   ### Expected Behavior
   
   Arrow should check `TZDIR` before falling back to hardcoded paths, 
consistent with POSIX conventions and tools such as glibc, busybox, and 
Python's `zoneinfo` module.
   
   
   ### Component(s)
   
   C++


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to