How to look up historical time zones by date and location

luofeiyu elearn2014 at gmail.com
Tue Aug 19 21:31:40 EDT 2014


 >>> tz1
<DstTzInfo 'Asia/Shanghai' LMT+8:06:00 STD>
 >>> repr(tz1)
"<DstTzInfo 'Asia/Shanghai' LMT+8:06:00 STD>"
 >>> x=repr(tz1)
 >>> x
"<DstTzInfo 'Asia/Shanghai' LMT+8:06:00 STD>"
 >>> import re
 >>> re.search("LMT.+\s",x).group()
'LMT+8:06:00 '


i got it ,thinks to all my friends .



More information about the Python-list mailing list