Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #60940
| From | Stéphane Klein <contact@stephane-klein.info> |
|---|---|
| Subject | Re: I look for a list to convert time zone abbreviation to full time zone in python |
| Date | 2013-12-03 16:27 +0100 |
| References | <l7ibsg$m9g$1@ger.gmane.org> <CADmi=6O_Te5L917Z8ihi315Jm_GOQ_N0sxotdAYWJ_dz_8WbzQ@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3514.1386084450.18130.python-list@python.org> (permalink) |
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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
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
csiph-web