Describe the bug, including details regarding any error messages, version, and platform.
import pyarrow as pa
import pyarrow.compute as pc
from datetime import datetime, timezone
from zoneinfo import ZoneInfo
string = '2038-04-01 03:00:00.000000'
dt = datetime.fromisoformat(string)
dt = dt.replace(tzinfo=ZoneInfo('America/Boise'))
tz = ZoneInfo('UTC')
converted_dt = dt.astimezone(tz)
print(converted_dt)
ts = pc.assume_timezone(pa.array([datetime(2038, 4, 1, 3)]), timezone='America/Boise')
print(ts)
The above prints
2038-04-01 09:00:00+00:00
[
2038-04-01 10:00:00.000000
]
whereas I was expecting
2038-04-01 09:00:00+00:00
[
2038-04-01 09:00:00.000000
]
Note that it's correct for year 2037 and earlier.
Versions:
- pyarrow: 12.0.0
- python: 3.10.6
Component(s)
Python
Describe the bug, including details regarding any error messages, version, and platform.
The above prints
whereas I was expecting
Note that it's correct for year 2037 and earlier.
Versions:
Component(s)
Python