views:

216

answers:

6

I want to know if there can be 2 or more GMT timezones for one city or state. I know there can be more then one GMT timezone for a country, but not sure if it's for state and city too. Share your knowledge please.

+2  A: 

There is only one gmt for the whole world. As for timezones, see here, showing variation of observance e.g. within Kansas.

Ramashalanka
A: 

There is only one GMT. Cities will have single time zone, States single as well, however a country can have multiple.

Jonathan
There are exceptions ... for example North Dakota has two timezones
Dominik
Not true: See http://en.wikipedia.org/wiki/Time_in_Indiana
Adam Batkin
Interesting, http://www.timetemperature.com/tzus/north_dakota_time_zone.shtml, we don't have that zone banding in Australia.
Jonathan
A: 

Have a look at http://www.worldtimezone.com/faq.html

Dominik
+1  A: 

Any arbitrary jurisdiction may have multiple timezones, though the majority do not.

Stemen
+5  A: 

I think you mean "Can one city or state span two time zones?". Yes. Mexico Beach, FL sits on the border between CST and EST with parts of the town in both time zones.

As for how you could tell a computer that, no idea.

tsilb
And even stranger, there are cities that span countries and share buildings, schools, and so on. http://www.nowpublic.com/press/us-canada-border-towns-face-security-crackdown
Jim Ferrans
Suprised me. Constantinople / Istanbul is the only one I knew of.
tsilb
You tell the computer which city's rules you are following: America/New_York for the EST part of Mexico Beach, and America/Chicago for the CST part of Mexico Beach. This is the standard proposed/adopted by the Olson database. Or use the aliases US/Eastern and US/Central.
Jonathan Leffler
+2  A: 

Interpreting the question to mean 'are there any cities which are in more than one time zone', then the answer is 'yes'. And there are American states with multiple time zones (Indiana and Arizona being two of them).

There has been recent discussion on the TZ mailing list about the area of China known as Xinjiang, which has a mixed population of Han Chinese and of Uyghurs. It seems that the Han use the standard Chinese time zone (Asia/Beijing), but the Uyghurs often use a local time zone. This is now encapsulated in the Olson database, with the name Asia/Urumqi for the Uyghur time zone.

So, for example, the zone.tab file in tzdata2010b.tar.gz, available from ftp://elsie.nci.nih.gov/pub/tzdata2010b.tar.gz (the code is ftp://elsie.nci.nih.gov/pub/tzcode2009t.tar.gz). There is an extensive description of how and why the change was made in the asia file.

Yes, time zones really do change 20 times a year around the world, and sometimes at essentially no notice (that is, the government legislates the changes only a day or two before the change).


@basit asks:

Wow about the 20 times a year around the world. I'm trying to log the timezone for latitude and longitude, so now my question would be, how long should I log the data for? 6 months? 1 month? 2.. 3..?

And also, how long does it take for daylight savings to change in a year, because I need to log timezone with daylight saving and refresh the data after certain given period.

What I mean is that during the course of 2009, there were 20 issues of the time zone database, because of changes in rules in at least that many places. However, any given country usually only changes their rules once - though with Argentina, different states were changing their rules at different times and compounding the problems.

I'm not clear that we have enough information to tell you how long to log the data for. I'd be inclined to say at least 12 months, but it depends what you are going to do with it. At one level, all you need to do is keep up with the Olson database - that will tell you the time zone rules for essentially everywhere in the world. If you are interested in tracking the time zones of your visitors, then you can keep the data for as long as you like. Since not everyone uses the canonical Continent/City notation for their time zone (I tend to use the older US/Pacific notation, for instance - which is still supported, but is equivalent to America/Los_Angeles). The classical notations such as TZ=EST5EDT are ambiguous; both the USA and Australia have timezones that use EST as an abbreviation, and the dates when the switch between standard and daylight saving time occurs varies (witness the mass of data in the Olson database).

You also ask 'how long does it take for a time zone to change'. I'm not sure what you mean. In terms of 'when the clocks change (between standard and daylight saving time)', it is 'instantaneous'; one second it is one time zone offset; the next second it is the other. If you mean 'how long does it take for governments to change their mind', it varies radically. For example, both Europe and the USA have relatively fixed rules that change every few years; the rule in the USA had been stable for about 20 years, then they changed the rules about 3 years ago. Europe is similar. On the other hand, some countries change their rules yearly. My impression is that some of the Islamic countries adjust when they switch between standard and daylight saving time (or vice versa) depending in part on when Ramadan falls - if the change would occur during Ramadan, then they bring it forward, or delay it, so that the rule does not change during Ramadan. Other countries have different reasons for the brinksmanship that goes on - maybe it is the political equivalent of a release deadline. So it may take quite a while for people to decide what the 'final' (meaning 'next edition') of the rules will be for a given year.

The web site http://worldtimezone.com/ does a pretty good job of keeping track of most of these idiosyncracies.

Jonathan Leffler
wow about the 20 times a year around the world. well im trying to log the timezone for latitude and longitude, so now my question would be, how long should i log the data for? 6 months? 1 month? 2.. 3..?
Basit
and also jonathan, how long does it take for daylight savings to change in a year?, cause i need to log timezone with daylight saving and refresh the data after certain given period
Basit
well the thing is im creating prayer times for muslims, 5 times prayer and that changes based on timezone and daylight savings, so i need to track the timezone and daylight savings and then calculate and show prayer times. i think i will just log the data for a month, on every month data should pulled again or get deleted and pulled again. what you think?
Basit
@basit: I searched for the rules on when Muslims pray. It seems to be based on the position of the sun, so you will presumably need latitude and longitude, as well as the time zone information and the ephemeris for the sun. I'm not clear how long the intervals are: http://en.wikipedia.org/wiki/Salah leaves the definitions fairly open. For most people, you probably need to track the 'big city' nearby which follows the same time zone rules as their locality does (the zone names in the Olson database), and their actual location. You can then probably make the necessary calculations.
Jonathan Leffler