I look for a list to convert time zone abbreviation to full time zone in python

Stéphane Klein contact at stephane-klein.info
Tue Dec 3 10:27:15 EST 2013


Le 03/12/13 11:07, Stuart Bishop a écrit :
> It could go into pytz (but generated from the IANA database, not from
> the list you quote). Whether it should go into pytz is debatable.
> 

Ok.

> If you need to map an abbreviation back to a single timezone you are
> solving the wrong problem, because you can only map an abbreviation
> back to a list of possible timezones (And that list might change when
> the database is corrected). Also, to correctly represent this you need
> to specify the point in time. EST in 'Tue Dec  3 20:44:00 EST 2013'
> maps to about 3 timezones. EST in 'Tue Dec  3 20:44:00 EST 2011' maps
> to about 6.
> 

Ok I understand this now.

My original need is by example, convert

Apr 16 12:09:00 SGT 2010

to UTC format.

I would like to use datetime.datetime.strptime function, but it don't success to
parse %Z param.

pytz haven't parse function.

python-dateutil have a auto discover parse function, but I don't want to use
this auto discover feature.

Question, pytz can't implement a parsing feature ?

Best regards,
Stéphane

-- 
Stéphane Klein <contact at stephane-klein.info>
blog: http://stephane-klein.info
Twitter: http://twitter.com/klein_stephane
cv: http://cv.stephane-klein.info




More information about the Python-list mailing list