[tz] [PATCH 0/1] Add Asia/Beijing
James M Leddy
james.leddy at canonical.com
Mon Aug 13 20:49:30 UTC 2012
On 08/13/2012 04:39 PM, Guy Harris wrote:
> On Aug 13, 2012, at 12:49 PM, James M Leddy wrote:
>> * The common proposed fix is that we should be using "human
>> presentable" names and have a mapping from these names to the
>> actual timezones. Since that proposal, indeed since the inception
>> of desktop Linux/Unix, no one (as far as I know) has actually done
> The desktop (well, laptop) Un*x[*] I'm running will, if I open System Preferences, disable "Set time zone automatically using current location", and drag the little blue location dot over towards China, offer a Time Zone of "China Standard Time" and list a number of cities in the drop-down list, including "Beijing - China" - and symlinks /etc/localtime to /usr/share/zoneinfo/Asia/Harbin.
> The map it displays has "Geonames.org" on it.
> says "The GeoNames geographical database covers all countries and contains over eight million placenames that are available for download free of charge."; it's licensed under a Creative Commons Attribution 3.0 License.
> According to
> one service they offer is "Timezone":
>> Webservice Type : REST
>> Url : api.geonames.org/timezone?
>> Parameters : lat,lng, radius (buffer in km for closest timezone in coastal areas), date (date for sunrise/sunset);
>> Result : the timezone at the lat/lng with gmt offset (1. January) and dst offset (1. July)
>> Example http://api.geonames.org/timezone?lat=47.01&lng=10.2&username=demo
>> This service is also available in JSON format : http://api.geonames.org/timezoneJSON?lat=47.01&lng=10.2&username=demo
>> timezoneId: name of the timezone (according to olson), this information is sufficient to work with the timezone and defines DST rules, consult the documentation of your development environment.
>> time: the local current time
>> rawOffset: the amount of time in hours to add to UTC to get standard time in this time zone. Because this value is not affected by daylight saving time, it is called raw offset.
>> gmtOffset: offset to GMT at 1. January (deprecated)
>> dstOffset: offset to GMT at 1. July (deprecated)
> so it appears that it translates a location to, among other things, an Olson database name. The example URL is for some location in Austria, as the XML that comes back is
>> <timezone tzversion="tzdata2012c">
>> <time>2012-08-13 22:31</time>
>> <sunrise>2012-08-13 06:14</sunrise>
>> <sunset>2012-08-13 20:32</sunset>
I'm assuming you're using our distro? See my response to Paul. Even
though we've done all this work we're still getting reports from
partners in China that it isn't good enough.
> You might want to tell Mark about this:
> [*] It's Lion, so it's not Unix, it's just Un*x:
Okay, I'll admit I wasn't including Apple as one of the desktop Unicies.
I also have no idea what their time-zone picker looks like. My interest
in this is mostly in solving this problem for the open source Unicies.
More information about the tz