You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "singhpratech (via GitHub)" <gi...@apache.org> on 2026/09/08 03:50:23 UTC
[I] [C++][Python] Timezone functions stop applying DST after 2037 even with a fat TZif file: a summer instant in 2050 gets the winter offset [arrow]
singhpratech opened a new issue, #51226:
URL: https://github.com/apache/arrow/issues/51226
**Describe the bug**
`assume_timezone` (and the other timezone-aware functions) apply the DST rule of `America/New_York`
correctly up to 2037 and then stop: from 2038 on, a July instant gets the standard-time offset
(UTC-5) instead of daylight time (UTC-4). The zoneinfo file on this machine is a "fat" TZif version 2
file whose footer carries the POSIX rule `EST5EDT,M3.2.0,M11.1.0`, so the rule for years past the
tabulated transitions is available in the file; `zoneinfo` from the Python standard library and
`zdump` both apply it. #42157 covers slim files, where no transitions are tabulated at all; this
happens with the fat file, once the tabulated transitions run out.
pyarrow 25.0.1, Python 3.13.9, macOS 26.6 (arm64), wheel from PyPI, system zoneinfo at
/usr/share/zoneinfo (America/New_York: 3552 bytes, TZif version 2, footer `EST5EDT,M3.2.0,M11.1.0`;
`zdump -v` tabulates transitions through 2037 and extends by the footer rule after that).
```python
import datetime as dt, zoneinfo, pyarrow as pa, pyarrow.compute as pc
tz = zoneinfo.ZoneInfo("America/New_York")
for year in (2025, 2037, 2038, 2050):
naive = dt.datetime(year, 7, 15, 12, 0) # July: daylight time, UTC-4
a = pa.array([naive], pa.timestamp("s"))
utc = pc.assume_timezone(a, "America/New_York").cast(pa.timestamp("s", "UTC")).to_pylist()[0]
off_pa = int((naive - utc.replace(tzinfo=None)).total_seconds())
off_py = int(naive.replace(tzinfo=tz).utcoffset().total_seconds())
print(year, "pyarrow", off_pa, "zoneinfo", off_py)
```
Output:
```
2025 pyarrow -14400 zoneinfo -14400
2037 pyarrow -14400 zoneinfo -14400
2038 pyarrow -18000 zoneinfo -14400
2050 pyarrow -18000 zoneinfo -14400
```
January instants give -18000 in every year, so from 2038 the offset is winter all year round.
**Expected behavior**
The offset for a July instant in 2038 and 2050 is -14400, as the file's footer rule and
`zoneinfo` give; the last tabulated transition should not end DST for the zone.
**Component(s)**
C++, Python
--
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: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [C++][Python] Timezone functions stop applying DST after 2037 even with a fat TZif file: a summer instant in 2050 gets the winter offset [arrow]
Posted by "Adarsh-Me (via GitHub)" <gi...@apache.org>.
Adarsh-Me commented on issue #51226:
URL: https://github.com/apache/arrow/issues/51226#issuecomment-5579013438
take
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [C++][Python] Timezone functions stop applying DST after 2037 even with a fat TZif file: a summer instant in 2050 gets the winter offset [arrow]
Posted by "singhpratech (via GitHub)" <gi...@apache.org>.
singhpratech commented on issue #51226:
URL: https://github.com/apache/arrow/issues/51226#issuecomment-5579336897
Closing this: it is a duplicate of #36110, open since 2023 and describing the same behaviour past
2038 (thanks to the search I should have done before filing). The one thing this report adds, that
the zoneinfo file here is a fat TZif version 2 file whose footer carries the POSIX rule the vendored
library does not apply, I have added as a comment there.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [C++][Python] Timezone functions stop applying DST after 2037 even with a fat TZif file: a summer instant in 2050 gets the winter offset [arrow]
Posted by "singhpratech (via GitHub)" <gi...@apache.org>.
singhpratech closed issue #51226: [C++][Python] Timezone functions stop applying DST after 2037 even with a fat TZif file: a summer instant in 2050 gets the winter offset
URL: https://github.com/apache/arrow/issues/51226
--
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: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org