Craig McQueen added the comment:
Alexander Belopolsky wrote:
No. Seconds since the epoch is neither local nor UTC. It is just
an elapsed number of seconds since an agreed upon time called the
epoch.
This statement just seems wrong. And I have just been confused by the current
Antoine Pitrou added the comment:
It makes a difference. It seems with the current behaviour, the
epoch is _in the local timezone_.
No it isn't. Two different machines:
$ LANG=C date
Wed Jan 16 21:47:03 UTC 2013
$ python -c import time; print(time.time())
1358372827.5
$ LANG=C date
Wed Jan
R. David Murray added the comment:
On linux/posix, the epoch is *defined* to be 1970, 1, 1 in UTC. Python just
uses whatever the OS defines the epoch to be, as far as I know.
--
___
Python tracker rep...@bugs.python.org
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 1559a82a3529 by R David Murray in branch '2.7':
#12758: removing confusing mention of UTC from time.time description
http://hg.python.org/cpython/rev/1559a82a3529
New changeset 5615d6b91b53 by R David Murray in
R. David Murray rdmur...@bitdance.com added the comment:
Thanks, Dylan.
--
nosy: +r.david.murray
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
type: - behavior
___
Python tracker rep...@bugs.python.org
Dylan Sarber dwsar...@gmail.com added the comment:
I patched this one up quickly. One has been changed using belopolsky's
recommendation, which already reads well.
--
keywords: +patch
nosy: +dwsarber
Added file: http://bugs.python.org/file24858/time_doc_fix.patch
New submission from Maxim Koltsov kolma...@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,
Marc-Andre Lemburg m...@egenix.com added the comment:
Maxim Koltsov wrote:
New submission from Maxim Koltsov kolma...@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:
Maxim Koltsov kolma...@gmail.com added the comment:
Then docs must be fixed. By the way, help(time.time) correctly says about
localtime.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12758
Changes by Marc-Andre Lemburg m...@egenix.com:
--
assignee: - docs@python
components: +Documentation, Library (Lib)
nosy: +docs@python
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12758
Changes by Marc-Andre Lemburg m...@egenix.com:
--
keywords: +easy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12758
___
___
Python-bugs-list
Ezio Melotti ezio.melo...@gmail.com added the comment:
Would dropping 'in UTC' from
Return the time as a floating point number expressed in seconds since the
epoch, in UTC.
be an acceptable solution? AFAIK there are no non-UTC epochs.
--
nosy: +ezio.melotti
stage: - needs patch
Maxim Koltsov kolma...@gmail.com added the comment:
Maybe add some words about local timezone?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12758
___
Ezio Melotti ezio.melo...@gmail.com added the comment:
Return the local time as a floating point number expressed in seconds since the
epoch.
--
nosy: +belopolsky
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12758
Maxim Koltsov kolma...@gmail.com added the comment:
Seems OK to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12758
___
___
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
Return the local time as a floating point number
expressed in seconds since the epoch.
No. Seconds since the epoch is neither local nor UTC. It is just an elapsed
number of seconds since an agreed upon time called the
16 matches
Mail list logo