FW: About China time zones

Paul Eggert eggert at cs.ucla.edu
Mon Sep 27 04:18:12 UTC 2010

On 09/26/2010 08:35 PM, Walter Korte wrote:
> if we add "Asia/Beijing", we no longer use the
> official time zone name from zoneinfo and we can't use the zoneinfo lib
> anymore to find out time zone information from time zone name

My impression is that the vast majority of users in China wouldn't
like to use the name 'Asia/Beijing'.  They'd far prefer having a name
like '北京' or '北京市' or '北京时间', and which of those names they'd
prefer depends on linguistic factors well beyond my ken.

It's a trivial matter for you to add whatever aliases you like for
time zone names, on your own platform.  Simply add "Link" commands to
your copy of the tz database, as is already done in the "backward"
file.  For example:

Link Asia/Shanghai 北京时间

and then your users can set TZ='北京时间'.  (Again, this string is
only my uninformed speculation! please consult a Chinese expert for
the proper string to use.)  Obviously this sort of thing is beyond the
scope of the tz project, which focuses on the tz data itself and
avoids localization.  However, you may wish to consult the CLDR
project <http://cldr.unicode.org/> which does contain localized names
for tz regions.

At the back of your request I detect misunderstanding of what the tz
database labels are supposed to be.  They are not supposed to be
official names for anything, or to reflect common names for time zone
regions.  Long ago we tried doing it that way, with names like
'US/Pacific', and it didn't work, because it mishandled historical
time stamps.  Adding a tz name like 'Beijing' would lead to the same
sort of errors that the old 'US/Pacific' name did.  In your
application these errors might be OK (which is why I suggested the
'Link' command above: it's bogus for old time stamps but most likely
good enough for your needs) but in general they are not OK.

More information about the tz mailing list