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


Groups > comp.lang.python > #76473 > unrolled thread

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

Started byluofeiyu <elearn2014@gmail.com>
First post2014-08-18 21:12 +0800
Last post2014-08-18 21:12 +0800
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

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

Fromluofeiyu <elearn2014@gmail.com>
Date2014-08-18 21:12 +0800
SubjectRe: How to look up historical time zones by date and location
Message-ID<mailman.13097.1408367592.18130.python-list@python.org>

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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web