Author |
Message |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 28/07/2006 20:47:41
|
Anonymous
|
I suppose for the most part, they can be derived from country codes.
For the countries with multiple zones, using the admin codes might work.
I guess they could be put into the admin codes table.
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 29/07/2006 18:22:00
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4486
Offline
|
For some countries even first administrative divisons can have different time zones, notably the US:
http://home-4.tiscali.nl/~t876506/Multizones.html
For the US time zone shape data is available for download :
http://nationalatlas.gov/mld/timeznp.html
I dont' know whether admincode2 would be sufficient. Would you like to delve into this topic and contribute to it?
Marc
|
 |
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 01/08/2006 21:33:25
|
Anonymous
|
Admittedly I forgot about places like that!
Ultimately you would have to resolve some records by using shape files.
I found some global ones here: (big question mark over distribution!)
http://fri.sfasu.edu/data/geographic/world/shape/
or http://fri.sfasu.edu/data/geographic/world/zip/
(country,time zone,primary admin,etc.,etc.. copyright=uncertain).
ERSI
http://www.esri.com/
(viewer,documentation of file format,etc.)
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 07/08/2006 16:51:00
|
Anonymous
|
See also http://www.earthtools.org/ which have a timezone webservice, no idea where the data is sourced and/or how accurate it is.
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 07/08/2006 17:32:56
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4486
Offline
|
the update is running right now and the timezone info will be available in the dump as of tomorrow.
We use the timezoneids from the time zone database (tz) :
http://www.twinsun.com/tz/tz-link.htm
For countries with a single timezone we directly use the tz database. For the US we use the shape files from the USGS to find the gmt offset and then we get the closest time zone within this gmt offset. For all others we use the shapes from the Forest Resources Institute to find the gmt offset and then we get the closest time zone within this gmt offset.
Marc
|
 |
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 09/08/2006 03:15:11
|
Anonymous
|
Great work. I didn't expect anything so soon!
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 29/08/2006 14:45:44
|
petrosv
Joined: 29/08/2006 14:30:20
Messages: 2
Offline
|
Thanx for incuding time zones Marc!
It would be really helpful if apart from the zone name (ex Europe/Athens) you could provide the actual time offset from GMT (ex +2). Also there is an issue with summer time, since some countries use it and others don't. In order to help I have created a list with time offsets and summer times (where applicable) for all countries (source: worldtimezone.com). I hope you find it useful.
http://users.hol.gr/~petrosv/Temp/timezones.xls
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 29/08/2006 19:26:58
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4486
Offline
|
Hi petros
Thanks for the list. I did not include GMT offset and DST as I fear it is a little bit too complex to be expressed in a single column. An other reason is I am a java programmer and all you need in java is the name of the timezone, the GMT/DST rules are included in java and you don't have to bother about it.
If we provide a list then it should have the same time zone names we use in the download. Do you think it makes sense to create a list with GMT offset? And for the DST is it sufficient to give the offset without dates and years?
Regards
Marc
Here the data for Greece from http://www.twinsun.com/tz/tz-link.htm :
Code:
# Greece
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# Whitman gives 1932 Jul 5 - Nov 1; go with Shanks & Pottenger.
Rule Greece 1932 only - Jul 7 0:00 1:00 S
Rule Greece 1932 only - Sep 1 0:00 0 -
# Whitman gives 1941 Apr 25 - ?; go with Shanks & Pottenger.
Rule Greece 1941 only - Apr 7 0:00 1:00 S
# Whitman gives 1942 Feb 2 - ?; go with Shanks & Pottenger.
Rule Greece 1942 only - Nov 2 3:00 0 -
Rule Greece 1943 only - Mar 30 0:00 1:00 S
Rule Greece 1943 only - Oct 4 0:00 0 -
# Whitman gives 1944 Oct 3 - Oct 31; go with Shanks & Pottenger.
Rule Greece 1952 only - Jul 1 0:00 1:00 S
Rule Greece 1952 only - Nov 2 0:00 0 -
Rule Greece 1975 only - Apr 12 0:00s 1:00 S
Rule Greece 1975 only - Nov 26 0:00s 0 -
Rule Greece 1976 only - Apr 11 2:00s 1:00 S
Rule Greece 1976 only - Oct 10 2:00s 0 -
Rule Greece 1977 1978 - Apr Sun>=1 2:00s 1:00 S
Rule Greece 1977 only - Sep 26 2:00s 0 -
Rule Greece 1978 only - Sep 24 4:00 0 -
Rule Greece 1979 only - Apr 1 9:00 1:00 S
Rule Greece 1979 only - Sep 29 2:00 0 -
Rule Greece 1980 only - Apr 1 0:00 1:00 S
Rule Greece 1980 only - Sep 28 0:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Europe/Athens 1:34:52 - LMT 1895 Sep 14
1:34:52 - AMT 1916 Jul 28 0:01 # Athens MT
2:00 Greece EE%sT 1941 Apr 30
1:00 Greece CE%sT 1944 Apr 4
2:00 Greece EE%sT 1981
# Shanks & Pottenger say it switched to C-Eur in 1981;
# go with EU instead, since Greece joined it on Jan 1.
2:00 EU EE%sT
|
 |
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 29/08/2006 20:48:00
|
Anonymous
|
marc wrote:
If we provide a list then it should have the same time zone names we use in the download. Do you think it makes sense to create a list with GMT offset? And for the DST should is is sufficient to give the offset without dates and years?
[/code]
This is exactly what I had in mind.
A simple list with GMT and DST offsets according to the time zone names you use in geonames would be just great. Thanks!
Dates for DST sound (and look) complicated. A simple offset number should be sufficient.
Cheers,
Petros
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 30/08/2006 19:13:18
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4486
Offline
|
Hi Petros
There is now a file called timeZones.txt in the dump directory :
http://download.geonames.org/export/dump/timeZones.txt
It contains all timezoneIds used in the geonames database and for every time zone the gmt offset on January 1st 2006 and the dst offset on 1st July 2006.
Regards
Marc
|
 |
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 06/09/2006 20:31:12
|
Anonymous
|
This is great Marc. Thanx a million!
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 06/09/2006 20:33:21
|
petrosv
Joined: 29/08/2006 14:30:20
Messages: 2
Offline
|
That was me, Petros. Forgot to log in ...
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 16/09/2006 16:36:21
|
NewAgeMobile.co.uk
Joined: 30/07/2006 17:06:29
Messages: 1
Location: Cornwall, UK
Offline
|
Hi All,
I created a login to help you out with who I am & remembered to use it
(I'm the thread's poster btw).
I'm glad to see someone else joining in here.
Since my last post on 09/08/2006, I haven't had much time to look back.
It would be nice to see the GMT offset (+ DST as well) included in some webservice results too.
I expect not everyone would need it, so it probably needs only to be in 1 or 2 of the longer 'style' types.
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 20/09/2006 06:59:23
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4486
Offline
|
Hi
The search service now has two xml attributes dstOffset and gmtOffset for the timezone element with the FULL style.
http://ws.geonames.org/search?q=london&style=full&maxRows=10
Marc
|
 |
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 28/11/2006 04:36:38
|
Anonymous
|
Anonymous wrote:
Admittedly I forgot about places like that!
Ultimately you would have to resolve some records by using shape files.
I found some global ones here: (big question mark over distribution!)
http://fri.sfasu.edu/data/geographic/world/shape/
or http://fri.sfasu.edu/data/geographic/world/zip/
(country,time zone,primary admin,etc.,etc.. copyright=uncertain).
ERSI
http://www.esri.com/
(viewer,documentation of file format,etc.)
----
those sfasu.edu sites are offline, but the Wayback Machine will retrieve all the content for you.
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 31/12/2006 16:15:12
|
Steven
Joined: 31/12/2006 16:08:18
Messages: 8
Offline
|
Hi,
Is it also possible to retrieve the timezone from the latitude and longitude? A webservice that returns the timezone offset for a given latitude/longitude in JSON format would be very welcome!
Cheers,
Steven
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 01/01/2007 22:33:40
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4486
Offline
|
Hi Steven
No Problem. Here it is :
http://ws.geonames.org/timezoneJSON?lat=47&lng=8
gmtOffset is on 1. Jan and
dstOffset is on 1. July
Regards
Marc
|
 |
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 02/01/2007 11:20:55
|
Steven
Joined: 31/12/2006 16:08:18
Messages: 8
Offline
|
Thanks Marc! I have two additional questions:
Does this service also supports a parameter called 'callback'?
Why doesn't the service always return the right gmt offset? For every place in Canada for example, it returns -3.5. Also, Australia and Russia give problems.
Steven
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 02/01/2007 12:55:27
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4486
Offline
|
Hi Steven
There was a silly bug in the code. It should now work fine. Let me know if you find other problems (I don't hope so).
All JSON services support the 'formatted' (pretty printing) and 'callback' parameters :
http://ws.geonames.org/timezoneJSON?lat=-31&lng=116&formatted=true
http://ws.geonames.org/timezoneJSON?lat=-31&lng=150&callback=timezone
Regards
Marc
|
 |
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 18/04/2007 19:40:07
|
graeme
Joined: 18/04/2007 19:16:48
Messages: 6
Offline
|
Open Ocean Timezones?
Are there any plans (hint hint!) to add support for open ocean timezones?
e.g.
http://ws.geonames.org/timezone?lat=11&lng=-156
In addition- it looks like you've possibly got a bug near the Hawaiian islands:
http://ws.geonames.org/timezone?lat=21&lng=-156
should return something I think. Its not that far from land.
(thanks for an incredible service!)
|
|
 |
|