convert time to UTC seconds since epoch

Alexander b3nder at yandex.ru
Tue Jul 20 18:51:24 EDT 2010


 On 21.07.2010 00:46, Rami Chowdhury wrote:
> On Jul 20, 2010, at 12:26 , Alexander wrote:
>
>> Hi, list
>>
>> How with python standard library to convert string like 'YYYY-MM-DD
>> mm:HH:SS ZONE' to seconds since epoch in UTC? ZONE may be literal time
>> zone or given in explicit way like +0100.
> If you have a sufficiently recent version of Python, have you considered time.strptime: http://docs.python.org/library/time.html#time.strptime ?
>
Yes. May be I don't undertand something. but it seems strptime doesn't
work with timezones at all. Only understands localzone and dates w/o zones.



More information about the Python-list mailing list