Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #76473

Re: How to look up historical time zones by date and location

Date 2014-08-18 21:12 +0800
From luofeiyu <elearn2014@gmail.com>
Subject Re: How to look up historical time zones by date and location
References <53F14971.3010209@gmail.com> <85mwb24h9o.fsf@benfinney.id.au> <53F1875F.4020109@gmail.com> <CAPTjJmrxAox15ZKSNR5HtbFJSBukK7GwKH91itLid8cNE8Nvsg@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.13097.1408367592.18130.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

|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.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: How to look up historical time zones by date and location luofeiyu <elearn2014@gmail.com> - 2014-08-18 21:12 +0800

csiph-web