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 barnburnr
Recipients barnburnr
Date 2010-10-14.14:08:01
SpamBayes Score 7.6921805e-07
Marked as misclassified No
Message-id <1287065285.33.0.306092502984.issue10102@psf.upfronthosting.co.za>
In-reply-to
Content
Just starting to dabble in the world of time and datetime objects.  I was converting an array of datetime objects to an array of floats via mktime to do some data analysis.  I have ran into an issue where mktime seems to be adding an hour on April 6, 2003.  Attached is an example script which I used to create the below output:

Python version:  (2, 6, 5, 'final', 0)
Epoch:  time.struct_time(tm_year=1970, tm_mon=1, tm_mday=1, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=3, tm_yday=1, tm_isdst=0)
First datetime:  2003-04-06 02:58:17
Second datetime:  2003-04-06 03:13:17
Is first datetime prior to second?:  True
First datetime, time struct: time.struct_time(tm_year=2003, tm_mon=4, tm_mday=6, tm_hour=2, tm_min=58, tm_sec=17, tm_wday=6, tm_yday=96, tm_isdst=-1)
Second datetime, time struct: time.struct_time(tm_year=2003, tm_mon=4, tm_mday=6, tm_hour=3, tm_min=13, tm_sec=17, tm_wday=6, tm_yday=96, tm_isdst=-1)
Is first time struct prior to second?:  True
First timestamp generated by mktime:  1049623097.0
Second timestamp generated by mktime:  1049620397.0
Is first timestamp less than second timestamp?:  False
First recovered datetime:  2003-04-06 03:58:17
Second recovered datetime:  2003-04-06 03:13:17
Is first recovered prior to second recovered?:  False
Is first recovered datetime same as original?:  False
Is second recovered datetime same as original?:  True
History
Date User Action Args
2010-10-14 14:08:05barnburnrsetrecipients: + barnburnr
2010-10-14 14:08:05barnburnrsetmessageid: <1287065285.33.0.306092502984.issue10102@psf.upfronthosting.co.za>
2010-10-14 14:08:02barnburnrlinkissue10102 messages
2010-10-14 14:08:02barnburnrcreate