time.mktime problem

Matt Hammond matt.hammond at rd.bbc.co.uk
Tue Aug 30 06:36:59 EDT 2005


I don't get the same results:

>>> import datetime, time
>>> ta1=(time.strptime('000001', '%H%M%S'))
>>> ta2=(time.strptime('230344', '%H%M%S'))
>>> t1=time.mktime(ta1)
>>> t2=time.mktime(ta2)
>>> print t1, t2
-2208988799.0 -2208905776.0
>>> print t1-t2
-83023.0

Suse 9.3, python 2.4 (all 64bit)


Matt

-- 

| Matt Hammond
| R&D Engineer, BBC Research and Development, Tadworth, Surrey, UK.



More information about the Python-list mailing list