This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eitan.adler
Recipients eitan.adler
Date 2018-05-19.10:41:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1526726499.81.0.682650639539.issue33579@psf.upfronthosting.co.za>
In-reply-to
Content
How to reproduce:
∴cat bad.py
import time
import calendar

one = time.gmtime(1234567899)
two = calendar.timegm(time.gmtime(1234567899))
three = time.gmtime(two)

print(one)
print(two)
print(three)
print(one == three)


Expected behavior:
the functions behave as documented: they are inverses


Actual behavior:

∴/srv/src/python/cpython/python bad.py
time.struct_time(tm_year=2009, tm_mon=2, tm_mday=13, tm_hour=23, tm_min=31, tm_sec=15, tm_wday=4, tm_yday=44, tm_isdst=0)
1234567875
time.struct_time(tm_year=2009, tm_mon=2, tm_mday=13, tm_hour=23, tm_min=30, tm_sec=51, tm_wday=4, tm_yday=44, tm_isdst=0)
False

Details: python built from f65e31fee3 under debug mode
History
Date User Action Args
2018-05-19 10:41:39eitan.adlersetrecipients: + eitan.adler
2018-05-19 10:41:39eitan.adlersetmessageid: <1526726499.81.0.682650639539.issue33579@psf.upfronthosting.co.za>
2018-05-19 10:41:39eitan.adlerlinkissue33579 messages
2018-05-19 10:41:39eitan.adlercreate