[Tutor] problem with time module

Dick Moores rdm at rcblue.com
Mon Aug 16 20:38:53 CEST 2004


Tim Peters wrote at 10:35 8/16/2004:
> >>> from time import mktime as m, localtime as lt
> >>> m(lt(0))
>0.0
> >>> m(lt(1))
>1.0
> >>> m(lt(2))
>2.0
> >>> m(lt(123456789))
>123456789.0
> >>>
>
>They're exact inverses, so long as localtime's argument is an integral
>value (has no fractional seconds)

Yikes! You're right. I've got it now--finally.

Thanks again,

Dick Moores




More information about the Tutor mailing list