[docs] [issue12758] time.time() returns local time instead of UTC

Craig McQueen report at bugs.python.org
Wed Jan 16 22:43:44 CET 2013


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 documentation, hence finding this issue. In what timezone is the "epoch"? It makes a difference. It seems with the current behaviour, the "epoch" is _in the local timezone_. So I reckon the documentation is unclear, because the way I read it, I interpretted it to mean UTC. I think it does need to state "in local time".

However, what I'd really prefer is a new function that returns the seconds since the epoch in UTC.

----------
nosy: +cmcqueen1975

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12758>
_______________________________________


More information about the docs mailing list