Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #60940 > unrolled thread

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

Started byStéphane Klein <contact@stephane-klein.info>
First post2013-12-03 16:27 +0100
Last post2013-12-03 16:27 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: I look for a list to convert time zone abbreviation to full time zone in python Stéphane Klein <contact@stephane-klein.info> - 2013-12-03 16:27 +0100

#60940 — Re: I look for a list to convert time zone abbreviation to full time zone in python

FromStéphane Klein <contact@stephane-klein.info>
Date2013-12-03 16:27 +0100
SubjectRe: I look for a list to convert time zone abbreviation to full time zone in python
Message-ID<mailman.3514.1386084450.18130.python-list@python.org>
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@stephane-klein.info>
blog: http://stephane-klein.info
Twitter: http://twitter.com/klein_stephane
cv: http://cv.stephane-klein.info

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web