Skip to content

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

@prasidmitra

Description

@prasidmitra

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions