[New-bugs-announce] [issue12758] time.time() returns local time instead of UTC
Maxim Koltsov
report at bugs.python.org
Tue Aug 16 09:52:04 CEST 2011
New submission from Maxim Koltsov <kolmax94 at gmail.com>:
Python docs (http://docs.python.org/library/time.html#time.time) say that time.time() function should return UTC timestamp, but actually i get local one:
>>> time.mktime(time.gmtime()), time.time(), time.mktime(time.localtime())
(1313466499.0, 1313480899.384221, 1313480899.0)
As you can see, the result of second statement is equal to result of the third, while it must be equal to result of the first. Checked on 2.7 and 3.1. My OS is Gentoo/Linux, timezone-info is the latest version (2011h).
----------
messages: 142167
nosy: maksbotan
priority: normal
severity: normal
status: open
title: time.time() returns local time instead of UTC
versions: Python 2.7, Python 3.1
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12758>
_______________________________________
More information about the New-bugs-announce
mailing list