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

2014-08-20 Thread Akira Li
zones (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, Asi

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

2014-08-19 Thread Ben Finney
luofeiyu writes: > >>> tz1 > > >>> repr(tz1) > "" Yes. Remember that ‘repr’ is for the benefit of the programmer, and there is no promise of what it contains. > >>> x=repr(tz1) > >>> x > "" > >>> import re > >>> re.search("LMT.+\s",x).group() > 'LMT+8:06:00 ' This is wildly fragile. The ‘repr

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

2014-08-19 Thread luofeiyu
>>> tz1 >>> repr(tz1) "" >>> x=repr(tz1) >>> x "" >>> import re >>> re.search("LMT.+\s",x).group() 'LMT+8:06:00 ' i got it ,thinks to all my friends . -- https://mail.python.org/mailman/listinfo/python-list

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

2014-08-19 Thread Cameron Simpson
On 19Aug2014 09:31, luofeiyu wrote: My dear friends here, all i want is get ` LMT+8:06:00` from the output of tz1 `` Shall we get back to the main point? That didn't seem to be your main point. You seemed to want to get Asia/Urumqi time by either natural longituide or by Beijing Time,

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

2014-08-19 Thread Denis McMahon
r some other "natural" time zone, or its LMT offset, or something > else? For any of those cases, I think the Olson database of *legal* time > zones is not going to be very useful. It would probably be better to > obtain the longitude and do the calculation yourself. Agreed, if O

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

2014-08-19 Thread Ian Kelly
t historical entry for the timezone in the database. Since the first entry is somewhat arbitrary, not all time zones will show LMT like this, and there is no guarantee that it won't change in some future update of pytz. In fact, there is an open bug to fix this behavior: https://bugs.launchpad.

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

2014-08-18 Thread luofeiyu
My dear friends here, all i want is get ` LMT+8:06:00` from the output of tz1 `` Shall we get back to the main point? If you are interested in it ,please say yes or no ,and how to do that ? import pytz,datetime tz1 = pytz.timezone('Asia/Shanghai') tz1 >>> str(tz1) 'Asia/Shanghai' -- ht

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

2014-08-18 Thread luofeiyu
My dear friends here, all i want is get ` |LMT+8:06:00` from the output of tz1 `||`| Shall we get back to the main point? If you are interested in it ,please say yes or no ,and how to do that ? -- https://mail.python.org/mailman/listinfo/python-list

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

2014-08-18 Thread Grant Edwards
On 2014-08-18, Ian Kelly wrote: > By working with dates far enough in the past that the modern time zone > rules don't apply. Some experimentation determines that the timedelta > between Shanghai and Urumqi goes from 136 minutes to 120 minutes in > 1928, and then from 120 minutes to 0 minutes in

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

2014-08-18 Thread pecore
Joel Goldstick writes: > Local Mean Time is time based on the actually astronomical position > of the sun. It is defined as 12 noon when the sun is at its high > point, directly south in the sky. This is the time you get when you > read a sundial! a sundial measures the Apparent Time, where th

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

2014-08-18 Thread pecore
Ian Kelly writes: > Some experimentation determines that the timedelta between Shanghai > and Urumqi Urumqi is on the way for the level of popularity that Piraeus enjoyed in the good ol'days -- per crimini come l'umanita'. MMAX, in IPI+IHC --

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

2014-08-18 Thread Chris “Kwpolska” Warrick
On 18 August 2014 20:03 "Ian Kelly" wrote: > I also don't know why pytz shows the LMT offset in the repr for those > timezones instead of the current UTC offset. If pytz objects do not have a datetime object attached, they default to the first ever entry, which is usually LMT. This can be problem

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

2014-08-18 Thread Ian Kelly
On Mon, Aug 18, 2014 at 11:53 AM, Ian Kelly wrote: > On Mon, Aug 18, 2014 at 7:12 AM, luofeiyu wrote: >> >> I found that it is a concept LMT local mean time can express my meaning. >> >> import pytz,datetime >> tz1 = pytz.timezone('Asia/Shanghai') >> tz1 >> >> >>> str(tz1) >> 'Asia/Shanghai' >>

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

2014-08-18 Thread Ian Kelly
On Mon, Aug 18, 2014 at 7:12 AM, luofeiyu wrote: > > I found that it is a concept LMT local mean time can express my meaning. > > import pytz,datetime > tz1 = pytz.timezone('Asia/Shanghai') > tz1 > > >>> str(tz1) > 'Asia/Shanghai' > > tz2 = pytz.timezone('Asia/Urumqi') > tz2 > > > the time diffe

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

2014-08-18 Thread Rustom Mody
It is defined as 12 noon when the sun is at its high point, > directly south in the sky. This is the time you get when you read a > sundial! > So each town or village set their clocks differently. That all > changed with the railroad industry. Once trains began traveling, time &g

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

2014-08-18 Thread Denis McMahon
On Mon, 18 Aug 2014 12:55:59 +0800, luofeiyu wrote: > 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 ec

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

2014-08-18 Thread Joel Goldstick
sky. This is the time you get when you read a sundial! So each town or village set their clocks differently. That all changed with the railroad industry. Once trains began traveling, time zones were invented so that everyone knew exactly what time it was in order to keep trains from meeting on the s

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

2014-08-18 Thread luofeiyu
|I found that it is a concept LMT local mean time can express my meaning. import pytz,datetime tz1 = pytz.timezone('Asia/Shanghai') tz1 str(tz1) 'Asia/Shanghai' | ||tz2 = pytz.timezone('Asia/Urumqi')| tz2 the time difference between shanghai and Urumqi is about 2 hours in the form of LMT.

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

2014-08-17 Thread Ben Finney
; There is only one localtime in all over the chian,beijin time,but > there are 5 timezone time in china . This just doesn't match the truth of standard time zones. You are free to think differently, but you will need to find a non-standard time zone database that agrees with you. > you

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

2014-08-17 Thread Chris Angelico
On Mon, Aug 18, 2014 at 2:55 PM, luofeiyu wrote: > 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 > econom

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

2014-08-17 Thread luofeiyu
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

How to look up historical time zones by date and location (was: How can I get the timezone time of a location?)

2014-08-17 Thread Ben Finney
or Urumqi is currently “China Standard Time”, UTC+8 hours. That time zone is true for all dates since 1949 to the present day. Are you perhaps asking not about *current* time zone, but time zones at a different point in time? Historical time zones in China have differed https://en.wikipedia.org/wiki/H

Re: os.stat and time zones

2014-05-25 Thread Ben Finney
Nagy László Zsolt writes: > This might be a silly question. Documentation of os.stat: > > > The exact meaning and resolution of the st_atime, st_mtime, and > > st_ctime attributes depend on the operating system and the file > > system. For example, on Windows systems using the FAT or FAT32 file >

Re: os.stat and time zones

2014-05-25 Thread Cameron Simpson
On 25May2014 13:47, Nagy László Zsolt wrote: This might be a silly question. Documentation of os.stat: The exact meaning and resolution of the st_atime, st_mtime, and st_ctime attributes depend on the operating system and the file system. For example, on Windows systems using the FAT or FAT32

os.stat and time zones

2014-05-25 Thread Nagy László Zsolt
This might be a silly question. Documentation of os.stat: The exact meaning and resolution of the st_atime, st_mtime, and st_ctime attributes depend on the operating system and the file system. For example, on Windows systems using the FAT or FAT32 file systems, st_mtime has 2-second resolutio

Re: Time zones and why they change so damned often

2014-01-11 Thread Alister
On Sat, 11 Jan 2014 11:10:41 +, Alister wrote: > On Sat, 11 Jan 2014 07:52:36 +, Bob Martin wrote: >we dont have "Daylight saving time" we switch between GMT (Greenwich >Mean Time) and BST (British Summer Time) at some point in the past we >have also used DST (Double Summer Tim

Re: Time zones and why they change so damned often

2014-01-11 Thread Alister
On Sat, 11 Jan 2014 11:10:41 +, Alister wrote: > On Sat, 11 Jan 2014 07:52:36 +, Bob Martin wrote: >we dont have "Daylight saving time" we switch between GMT (Greenwich >Mean Time) and BST (British Summer Time) at some point in the past we >have also used DST (Double Summer Tim

Re: Time zones and why they change so damned often

2014-01-11 Thread Alister
On Sat, 11 Jan 2014 07:52:36 +, Bob Martin wrote: we dont have "Daylight saving time" we switch between GMT (Greenwich Mean Time) and BST (British Summer Time) at some point in the past we have also used DST (Double Summer Time). >>> >>> British Summer Time *is* Daylight Saving Time

Re: Time zones and why they change so damned often

2014-01-11 Thread Gene Heskett
On Friday 10 January 2014 21:52:49 Dennis Lee Bieber did opine: > On Fri, 10 Jan 2014 19:55:37 + (UTC), Grant Edwards > > declaimed the following: > >It got darned cold here in Minnesota on Monday (-23F in Minneapolis, > >-35F in Embarass), but Hell is in Michigan -- where it only got down >

Re: Time zones and why they change so damned often

2014-01-10 Thread Bob Martin
in 714281 20140110 090409 Alister wrote: >On Fri, 10 Jan 2014 07:31:11 +, Bob Martin wrote: > >> in 714232 20140109 120741 Alister wrote: >>>On Thu, 09 Jan 2014 07:17:25 +, Mark Lawrence wrote: >>> On 09/01/2014 04:14, Chris Angelico wrote: > On Thu, Jan 9, 2014 at 2:54 PM, Ben F

Re: Time zones and why they change so damned often (was: the Gravity of Python 2)

2014-01-10 Thread Roy Smith
In article , Peter Pearson wrote: > Around 30 years ago, the Wall Street Journal ran an opinion piece > advocating the abandonment of time zones and the unification of the > globe into a single glorious time zone. After enumerating the > efficiencies to be achieved by this system

Re: Time zones and why they change so damned often

2014-01-10 Thread Gene Heskett
heck UTC > >>> time, the Brits and Europeans check UTC or just know what UTC is, > >>> and the Americans say "Doesn't that happen at 8 o'clock Eastern > >>> time?" and get confused. > >> > >> Around 30 years ago, the Wall Street J

Re: Time zones and why they change so damned often

2014-01-10 Thread Grant Edwards
On 2014-01-10, Mark Lawrence wrote: > Hell will freeze over first. But apparently it already has in > Minnesota. Drat, drat and double drat!!! It got darned cold here in Minnesota on Monday (-23F in Minneapolis, -35F in Embarass), but Hell is in Michigan -- where it only got down to -15F.

Re: Time zones and why they change so damned often

2014-01-10 Thread Mark Lawrence
30 years ago, the Wall Street Journal ran an opinion piece advocating the abandonment of time zones and the unification of the globe into a single glorious time zone. After enumerating the efficiencies to be achieved by this system, the writer briefly addressed the question of whose time zone wo

Re: Time zones and why they change so damned often

2014-01-10 Thread MRAB
t Journal ran an opinion piece advocating the abandonment of time zones and the unification of the globe into a single glorious time zone. After enumerating the efficiencies to be achieved by this system, the writer briefly addressed the question of whose time zone would become the global standard, promp

Re: Time zones and why they change so damned often (was: the Gravity of Python 2)

2014-01-10 Thread Peter Pearson
, > and the Aussies (myself included) know to check UTC time, the Brits > and Europeans check UTC or just know what UTC is, and the Americans > say "Doesn't that happen at 8 o'clock Eastern time?" and get confused. Around 30 years ago, the Wall Street Journal ran an opinio

Re: Time zones and why they change so damned often

2014-01-10 Thread Alister
On Fri, 10 Jan 2014 07:31:11 +, Bob Martin wrote: > in 714232 20140109 120741 Alister wrote: >>On Thu, 09 Jan 2014 07:17:25 +, Mark Lawrence wrote: >> >>> On 09/01/2014 04:14, Chris Angelico wrote: On Thu, Jan 9, 2014 at 2:54 PM, Ben Finney wrote: > I'm approaching it

Re: Time zones and why they change so damned often

2014-01-09 Thread Bob Martin
in 714232 20140109 120741 Alister wrote: >On Thu, 09 Jan 2014 07:17:25 +, Mark Lawrence wrote: > >> On 09/01/2014 04:14, Chris Angelico wrote: >>> On Thu, Jan 9, 2014 at 2:54 PM, Ben Finney >>> wrote: I'm approaching it with the goal of knowing better what I'm talking about when I a

Re: Time zones and why they change so damned often (was: the Gravity of Python 2)

2014-01-09 Thread Dave Angel
On Thu, 9 Jan 2014 15:14:55 +1100, Chris Angelico wrote: [1] For those who aren't right up on timezone trivia, AZ has no DST. Similarly the Australian state of Queensland does not shift its clocks. And Indiana. -- DaveA -- https://mail.python.org/mailman/listinfo/python-list

Re: Time zones and why they change so damned often

2014-01-09 Thread Alister
On Thu, 09 Jan 2014 07:17:25 +, Mark Lawrence wrote: > On 09/01/2014 04:14, Chris Angelico wrote: >> On Thu, Jan 9, 2014 at 2:54 PM, Ben Finney >> wrote: >>> I'm approaching it with the goal of knowing better what I'm talking >>> about when I advocate scrapping the whole DST system :-) >> >>

Re: Time zones and why they change so damned often

2014-01-08 Thread Mark Lawrence
On 09/01/2014 04:14, Chris Angelico wrote: On Thu, Jan 9, 2014 at 2:54 PM, Ben Finney wrote: I'm approaching it with the goal of knowing better what I'm talking about when I advocate scrapping the whole DST system :-) I would definitely support the scrapping of DST. I'm less sure that we need

Re: Time zones and why they change so damned often (was: the Gravity of Python 2)

2014-01-08 Thread Chris Angelico
On Thu, Jan 9, 2014 at 2:54 PM, Ben Finney wrote: > I'm approaching it with the goal of knowing better what I'm talking > about when I advocate scrapping the whole DST system :-) I would definitely support the scrapping of DST. I'm less sure that we need exactly 24 timezones around the world, tho

Time zones and why they change so damned often (was: the Gravity of Python 2)

2014-01-08 Thread Ben Finney
Chris Angelico writes: > On Thu, Jan 9, 2014 at 2:34 PM, Ben Finney wrote: > > With time zones, as with text encodings, there is a single > > technically elegant solution (for text: Unicode; for time zones: > > twelve simple, static zones that never change) > > Twe

Re: time module question - time zones

2008-05-21 Thread Eric Wertman
Sorry, my time zone is +4, not minus 4, which means that something else is causing my source data to be in the future. I still do need to understand where the time routines determine the time zone offset, so I can be sure I'm passing around the neutral value. Thanks! On Wed, May 21, 2008 at 12:

time module question - time zones

2008-05-21 Thread Eric Wertman
I tend to deal with dates a lot in different formats and places... typically I'll convert them to a time tuple with strptime(), and pass them around like that before I need to write them back out. One set of time/dates I'm getting are in UTC, but the string doesn't say that specifically. So I do

Re: Time zones

2004-12-01 Thread David Bolen
Timothy Hume <[EMAIL PROTECTED]> writes: > I want to ensure that all my time calculations are done in UTC. This is > easy with Python on UNIX machines. I simply set the TZ environment > variable to "UTC", and it ensures that the time functions use UTC. > > My question is, how do I get similar

Time zones

2004-12-01 Thread Timothy Hume
Hi, I want to ensure that all my time calculations are done in UTC. This is easy with Python on UNIX machines. I simply set the TZ environment variable to "UTC", and it ensures that the time functions use UTC. My question is, how do I get similar functionality using Python on Windows? Thanks