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


Groups > comp.lang.python > #76678

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

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.106
X-Spam-Level *
X-Spam-Evidence '*H*': 0.81; '*S*': 0.02; 'dst': 0.09; 'e.g.,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:How': 0.10; '[2].': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'timezones': 0.16; 'url:time': 0.16; 'utc': 0.16; 'variations': 0.16; 'width,': 0.16; 'library': 0.18; 'shape': 0.19; 'header:User-Agent:1': 0.23; 'url:maps': 0.26; 'header:X-Complaints-To:1': 0.27; '[1]': 0.29; '[2]': 0.30; 'usually': 0.31; 'python).': 0.31; 'writes:': 0.31; 'subject:time': 0.33; 'point.': 0.35; 'there': 0.35; '(e.g.,': 0.36; 'programming,': 0.36; 'east': 0.36; 'shows': 0.36; 'url:org': 0.36; 'behind': 0.37; 'example,': 0.37; 'message- id:@gmail.com': 0.38; 'ahead': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'skip:p 20': 0.39; 'received:org': 0.40; 'times': 0.62; 'name': 0.63; 'decided': 0.64; 'more': 0.64; 'different': 0.65; 'due': 0.66; 'determine': 0.67; 'hour': 0.70; "earth's": 0.84; 'longitude': 0.84; 'subject:location': 0.84; 'surface': 0.84; 'travels': 0.84; 'url:china': 0.84; 'received:89': 0.85; 'political': 0.97; 'china': 0.97; 'economic': 0.98
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Akira Li <4kir4.1i@gmail.com>
Subject Re: How to look up historical time zones by date and location
Date Wed, 20 Aug 2014 21:01:08 +0400
References <53F14971.3010209@gmail.com> <85mwb24h9o.fsf@benfinney.id.au> <53F1875F.4020109@gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
X-Gmane-NNTP-Posting-Host 89.169.229.68
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
Cancel-Lock sha1:6c0koJO7pASLGH/38bkCKFmojpo=
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.13217.1408554082.18130.python-list@python.org> (permalink)
Lines 47
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1408554082 news.xs4all.nl 2933 [2001:888:2000:d::a6]:59247
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:76678

Show key headers only | View raw


luofeiyu <elearn2014@gmail.com> writes:

> http://www.thefreedictionary.com/time+zone
>
> time zone Any of the 24 divisions of the Earth's surface used to
> determine the local time for any given locality.
> Each zone is roughly 15° of longitude in width, with local variations
> for economic and political convenience.
> Local time is one hour ahead for each time zone as one travels east
> and one hour behind for each time zone as one travels west.
>
> Urumqi  's localtime is beijin time ,it is decided  by law .
> Urumqi  's timezone is east 6 ,it is decided by geography.
>
> There is only one localtime in all over the chian,beijin time,but
> there are 5  timezone time in china .
>

In programming, a different timezone defintion is usually used [1] (pytz
library provides access to the timezone database in Python). There are
much more than 24 timezones (e.g., look at pytz.common_timezones) and a
UTC offset used in a place may be unrelated to its longitude. A timezone
is more a political entity than a geographical.

[1] http://www.iana.org/time-zones

For example, here's a shapefile for China [2].  It shows the shape of
Asia/Chongqing, Asia/Harbin, Asia/Kashgar, Asia/Shanghai, Asia/Urumqi
timezones on a map.

[2] http://efele.net/maps/tz/china/

Different timezones may have the same UTC offset at some point. UTC
offset for the same timezone may be different at different times e.g.,
due to DST transitions.

There are multiple ways to get a timezone name from location [3].

[3]
http://stackoverflow.com/questions/16505501/get-timezone-from-city-in-python-django


--
Akira


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


Thread

Re: How to look up historical time zones by date and location Akira Li <4kir4.1i@gmail.com> - 2014-08-20 21:01 +0400

csiph-web