Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DstTzInfo.localize() breaks for date '9999-12-31' #108

Open
prasidmitra opened this issue Aug 3, 2023 · 0 comments
Open

DstTzInfo.localize() breaks for date '9999-12-31' #108

prasidmitra opened this issue Aug 3, 2023 · 0 comments

Comments

@prasidmitra
Copy link

prasidmitra commented Aug 3, 2023

Bug

DstTzInfo.localize() breaks for date '9999-12-31'

Steps to reproduce

pytz.timezone("US/Pacific").localize(datetime(9999,12,31))

Error

OverflowError: date value out of range

Notes

Bug in

for delta in [timedelta(days=-1), timedelta(days=1)]:

Adding 1 day to 9999-12-31 is a date overflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant