Skip to content

Instantly share code, notes, and snippets.

@jed
Created August 1, 2011 06:19
Show Gist options
  • Save jed/1117653 to your computer and use it in GitHub Desktop.
Save jed/1117653 to your computer and use it in GitHub Desktop.
discrepancy for api.geonames.org/timezone
the xml and json endpoints for http://api.geonames.org/timezone are inconsistent,
in that the json endpoint doesn't return the date.
http://api.geonames.org/timezone?lat=47.01&lng=10.2&username=jed&date=2011-07-13
=> the date is specified in the query string, and included in the results
http://api.geonames.org/timezoneJSON?lat=47.01&lng=10.2&username=jed&date=2011-07-13
=> the date is specified in the query string, but not included in the results
{"time":"2011-08-01 08:13","countryName":"Austria","sunset":"2011-08-01 20:52","rawOffset":1,"dstOffset":2,"countryCode":"AT","gmtOffset":1,"lng":10.2,"sunrise":"2011-08-01 05:57","timezoneId":"Europe/Vienna","lat":47.01}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<geonames>
<timezone>
<countryCode>AT</countryCode>
<countryName>Austria</countryName>
<lat>47.01</lat>
<lng>10.2</lng>
<timezoneId>Europe/Vienna</timezoneId>
<dstOffset>2.0</dstOffset>
<gmtOffset>1.0</gmtOffset>
<rawOffset>1.0</rawOffset>
<time>2011-08-01 08:17</time>
<sunrise>2011-08-01 05:57</sunrise>
<sunset>2011-08-01 20:52</sunset>
<date date="2011-07-13">
<sunrise>2011-07-13 05:36</sunrise>
<sunset>2011-07-13 21:12</sunset>
</date>
</timezone>
</geonames>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment