A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/306046.html below:

strptime() doesn't recognize BST as a valid timezone

strptime() doesn't recognize BST as a valid timezoneAdam Monsen haircut at gmail.com
Fri Sep 16 15:08:13 EDT 2005
Ok, I've figured this out.

>>> import os, time
>>> date = '10 August 2005 at 17:26 BST'
>>> format = '%d %B %Y at %H:%M %Z'
>>> os.environ['TZ'] = 'Europe/London'
>>> time.strptime(date, format)
(2005, 8, 10, 17, 26, 0, 2, 222, 1)

Works (unsuprisingly) as advertised at the bottom of this page:
http://docs.python.org/lib/module-time.html

And now I'm a little closer to understanding why. :)

-- 
Adam Monsen
http://adammonsen.com/


More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4