Mailing List Archive

[issue44413] OverflowError: mktime argument out of range after 2019
New submission from Vyacheslav <psijic@gmail.com>:

date_str = "2019-06-06 10:02:00"
datetime_obj = datetime.strptime(date_str, "%Y-%m-%d %H:%M:%S")
datetime_obj_utc1 = datetime_obj.replace(tzinfo=pytz.timezone("America/New_York"))
datetime_obj_utc2 = pytz.timezone("America/New_York").localize(datetime_obj)
print(datetime_obj_utc1, datetime_obj_utc2)
ts1 = time.mktime(datetime_obj_utc1.timetuple())
ts2 = time.mktime(datetime_obj_utc2.timetuple())

>>> Output:
ts2 = int(time.mktime(datetime_obj_utc2.timetuple()))
OverflowError: mktime argument out of range


OS: Linux OpenSuse TW

----------
messages: 395758
nosy: psijic
priority: normal
severity: normal
status: open
title: OverflowError: mktime argument out of range after 2019
type: crash
versions: Python 3.8

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue44413>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue44413] OverflowError: mktime argument out of range after 2019 [ In reply to ]
Terry J. Reedy <tjreedy@udel.edu> added the comment:

An exception is not a 'crash', as defined for this tracker. 3.8 only gets security fixes. A 3.9 or 3.10 test is needed and Windows does not have pytz.

----------
nosy: +belopolsky, lemburg, p-ganssle, terry.reedy
type: crash -> behavior

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue44413>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com