_isdst crashes with big dates on x86

Bug #1170375 reported by Dzmitry Dzemidzenka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dateutil
New
Undecided
Unassigned

Bug Description

timestamp = ((dt.toordinal() - EPOCHORDINAL) * 86400
                     + dt.hour * 3600
                     + dt.minute * 60
                     + dt.second)
        return time.localtime(timestamp+time.timezone).tm_isdst

The code above is failing because of the overflow on 32bit systems for dates like '2049-06-20T12:34:40+03:00'

ValueError('timestamp out of range for platform time_t',)

description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.