python 1.5.2 time bug?

Fredrik Lundh fredrik at effbot.org
Wed Nov 1 11:41:33 EST 2000


Anton Gluck wrote:
> Is there possibly a bug in Python 1.5.2 in its handling of the time? Since
> yesterday python tells me that it's December 31 1969. I've tried this on my
> own machine (running Windows 2000) and on a Unix machine at work (some flavor
> of Solaris). time.clock() returns values close to 0 (but increasing -
> apparently the clock was reset? it rolled over?), and
> time.asctime(time.localtime(time.clock())) gives me the 1969 date.

looks like a pilot error:

time.clock() gives you the process time, in seconds since an
arbitrary point in time (usually when the process was started).
Clock values may roll over after a relatively short time (like,
say, after 36 minutes)

to get the real ("wall") time, use time.time().

</F>





More information about the Python-list mailing list