How to look up historical time zones by date and location

luofeiyu elearn2014 at gmail.com
Mon Aug 18 09:12:44 EDT 2014


|I found that it is a concept LMT local mean time can express my meaning.

import pytz,datetime
tz1 = pytz.timezone('Asia/Shanghai')
tz1
<DstTzInfo 'Asia/Shanghai' LMT+8:06:00 STD>
>>> str(tz1)
'Asia/Shanghai'
|
||tz2 = pytz.timezone('Asia/Urumqi')|
tz2
<DstTzInfo 'Asia/Urumqi' LMT+5:50:00 STD>

the time difference between shanghai and Urumqi is about 2 hours in the form of LMT.

now ,how can i get the output of|`|LMT+8:06:00|` in|<DstTzInfo 'Asia/Shanghai' LMT+8:06:00 STD>|

str(tz1) or str(tz2) can not do that.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20140818/b4eacb1a/attachment.html>


More information about the Python-list mailing list