convert time to UTC seconds since epoch

Chris Rebert clp2 at rebertia.com
Tue Jul 20 21:44:40 EDT 2010


On Tue, Jul 20, 2010 at 6:31 PM, Greg Hennessy <greg.hennessy at cox.net> wrote:
> On 2010-07-20, Rami Chowdhury <rami.chowdhury at gmail.com> wrote:
>> If you have a sufficiently recent version of Python, have you
>>considered time.strptime:
>>http://docs.python.org/library/time.html#time.strptime ?
>
> Given the documentation talks about "double leap seconds" which don't
> exist, why should this code be trusted?

Because they exist(ed) in POSIX. See
http://www.ucolick.org/~sla/leapsecs/onlinebib.html :
"""
The standards committees decided that POSIX time should be UTC, but
the early POSIX standards inexplicably incorporated a concept which
never existed in UTC -- the ``double leap second''. This mistake
reportedly existed in the POSIX standard from 1989, and it persisted
in POSIX until at least 1997.
"""

Cheers,
Chris
--
http://blog.rebertia.com



More information about the Python-list mailing list