Formatting Time

Andrew Dalke dalke at dalkescientific.com
Fri Jun 3 11:46:56 EDT 2005


Coates, Steve (ACHE) wrote:
>>>> import time
>>>> t=36100.0
>>>> time.strftime('%H:%M:%S',time.gmtime(t))
> '10:01:40'

But if t>=24*60*60 then H cycles back to 0

>>> import time
>>> t=24*60*60
>>> time.strftime('%H:%M:%S',time.gmtime(t))
'00:00:00'
>>> 

				Andrew
				dalke at dalkescientific.com




More information about the Python-list mailing list