Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'bishop': 0.09; 'feature.': 0.09; 'function,': 0.09; 'parsing': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'stuart': 0.16; 'subject: \n ': 0.16; 'timezones': 0.16; 'utc': 0.16; 'subject:python': 0.16; '(but': 0.19; 'header:User-Agent:1': 0.23; 'parse': 0.24; 'specify': 0.24; "haven't": 0.24; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'feature': 0.29; 'database,': 0.30; 'dec': 0.30; 'est': 0.30; 'subject:list': 0.30; 'twitter:': 0.31; 'ok.': 0.31; 'blog:': 0.33; 'subject:time': 0.33; 'skip:d 20': 0.34; 'could': 0.34; "can't": 0.35; 'convert': 0.35; 'but': 0.35; 'format.': 0.36; 'possible': 0.36; 'should': 0.36; 'example,': 0.37; 'wrong': 0.37; 'list': 0.37; 'implement': 0.38; 'represent': 0.38; 'auto': 0.38; 'question,': 0.38; 'solving': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'success': 0.61; 'from:charset:utf-8': 0.61; 'back': 0.62; 'map': 0.64; 'klein': 0.68; 'url:info': 0.73; 'discover': 0.82; 'sgt': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: =?UTF-8?B?U3TDqXBoYW5lIEtsZWlu?= Subject: Re: I look for a list to convert time zone abbreviation to full time zone in python Date: Tue, 03 Dec 2013 16:27:15 +0100 References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: 37.162.51.71 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 43 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1386084450 news.xs4all.nl 2961 [2001:888:2000:d::a6]:45233 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:60940 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 blog: http://stephane-klein.info Twitter: http://twitter.com/klein_stephane cv: http://cv.stephane-klein.info