[tz] Add new timezone for Hanoi Capital, Vietnam

Guy Harris guy at alum.mit.edu
Mon Feb 18 04:40:17 UTC 2019

On Feb 17, 2019, at 8:22 PM, KP <khaiphan9x at gmail.com> wrote:

> Ho Chi Minh City and Hanoi are two separate big economic regions of Vietnam, just like Nick Phake said, creating two separate time zone names for the two regions is reasonable.

Tzdb regions aren't created based on economic regions, they're created based on time zone offsets and standard/summer time rules; to quote the "Scope of the tz database" section of the theory document:

	The tz database attempts to record the history and predicted future of all computer-based clocks that track civil time. 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). The database labels each timezone with a notable location and records all known clock transitions for that location. Although 1970 is a somewhat-arbitrary cutoff, there are significant challenges to moving the cutoff earlier even by a decade or two, due to the wide variety of local practices before computer timekeeping became prevalent.

	Each timezone typically corresponds to a geographical region that is smaller than a traditional time zone, because clocks in a timezone all agree after 1970 whereas a traditional time zone merely specifies current standard time. For example, applications that deal with current and future timestamps in the traditional North American mountain time zone can choose from the timezones America/Denver which observes US-style daylight saving time, America/Mazatlan which observes Mexican-style DST, and America/Phoenix which does not observe DST. Applications that also deal with past timestamps in the mountain time zone can choose from over a dozen timezones, such as America/Boise, America/Edmonton, andAmerica/Hermosillo, each of which currently uses mountain time but differs from other timezones for some timestamps after 1970.

	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.

so, according to what Phake Nick said:

	It is actually reasonable to have both Asia/Hanoi and Asia/Ho_Chi_Minh in tz database because the two cities (and the two fractions that control them) used different timezone from year 1968 to 1975, which mean even time after the UNIX Epoch would be affected.

there would be two zones because, on dates since the POSIX Epoch, the two regions differed in their time zone.

> You have also said that using Shanghai's time zone represents China, but then still creates timezones for Beijing.

I don't know who created a timezone for Beijing, but the tzdb doesn't do so, because there is no difference that we know of between Beijing and Shanghai and... in either offset-from-UTC or standard/summer time rules.

There *is* a second tzdb region for China, Asia/Urumqi, which has an offset of +0600 from UTC, rather than the +0800 for the Asia/Shanghai zone for most of China, and which is always in standard time, unlike Asia/Shanghai, which had summer time rules from 1986 until 1991.

More information about the tz mailing list