localtime(clock()) yields 12/31/69 under Wme

Kalle Svensson kalle at gnupung.net
Tue Jan 30 16:16:32 EST 2001


Sez haaserd:
> Hi,
> This is my first attempt at using the time module.  I get:
> 
> >>>
> >>> import time
> >>> time.clock()
> 14628.151040915873
> >>> time.localtime(time.clock())
> (1969, 12, 31, 21, 3, 57, 2, 365, 0)
> >>>
> 

You probably want time.time(), not time.clock().

Peace,
  Kalle
-- 
Email: kalle at gnupung.net     | You can tune a filesystem, but you
Web: http://www.gnupung.net/ | can't tune a fish. -- man tunefs(8)
PGP fingerprint: 0C56 B171 8159 327F 1824 F5DE 74D7 80D7 BF3B B1DD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20010130/23692602/attachment.sig>


More information about the Python-list mailing list