[tz] Add new timezone for Hanoi Capital, Vietnam
guy at alum.mit.edu
Mon Feb 18 19:41:34 UTC 2019
On Feb 18, 2019, at 11:27 AM, KP <khaiphan9x at gmail.com> wrote:
> Why is Bangkok's time taken from 1920, but Hanoi's time is only taken from 1970?
To quote the theory page:
It organizes time zone and daylight saving time data by partitioning the world into timezones whose clocks all agree about timestamps that occur after the POSIX Epoch (1970-01-01 00:00:00 UTC).
Clock transitions before 1970 are recorded for each timezone, because most systems support timestamps before 1970 and could misbehave if data entries were omitted for pre-1970 transitions. However, the database is not designed for and does not suffice for applications requiring accurate handling of all past times everywhere, as it would take far too much effort and guesswork to record all details of pre-1970 civil timekeeping. Although some information outside the scope of the database is collected in a file backzone that is distributed along with the database proper, this file is less reliable and does not necessarily follow database guidelines.
* Use the most populous among locations in a region, e.g., prefer Asia/Shanghai to Asia/Beijing. Among locations with similar populations, pick the best-known location, e.g., prefer Europe/Rome to Europe/Milan.
The first of those means that the tzdb region ("timezone") that includes Bangkok also includes Hanoi, as clocks in Thailand and the northern part of Vietnam agree about timestamps that occur after the POSIX Epoch, even though they disagree about time zones that occur before it.
The second of those means that the entry for that region must have *something* for times prior to the Epoch, even if it's not accurate for all of that region prior to the Epoch, and even if it's not accurate for *any* of that region due to the "effort and guesswork" needed to get it to be accurate not being done, and that some information might still be available in the backzone file - which it is, for Vietnam:
# From Paul Eggert (2014-10-13):
# See Asia/Ho_Chi_Minh for the source for this data.
# Trần's book says the 1954-55 transition to 07:00 in Hanoi was ins.
# October 1954, with exact date and time unspecified.
Zone Asia/Hanoi 7:03:24 - LMT 1906 Jul 1
7:06:30 - PLMT 1911 May 1
7:00 - +07 1942 Dec 31 23:00
8:00 - +08 1945 Mar 14 23:00
9:00 - +09 1945 Sep 2
7:00 - +07 1947 Apr 1
8:00 - +08 1954 Oct
7:00 - +07
The third of those means that the name chosen for that zone is Asia/Bangkok rather than Asia/Hanoi, so it has pre-Epoch data for Thailand rather than Vietnam.
More information about the tz