0

How can I check timezone transition information in windows? In windows I can only find my timezone(in Hong Kong) is "China Standard Time". While I have noticed that in IANA database there is "Asia/Hong_Kong" and some rules for DST in the past:

# Rule  NAME    FROM    TO  -   IN  ON  AT  SAVE    LETTER/S
Rule    HK  1946    only    -   Apr 21  0:00    1:00    S
Rule    HK  1946    only    -   Dec 1   3:30s   0   -
Rule    HK  1947    only    -   Apr 13  3:30s   1:00    S
Rule    HK  1947    only    -   Nov 30  3:30s   0   -
Rule    HK  1948    only    -   May 2   3:30s   1:00    S

I have looked into registry for "China Standard Time" in this answer. It doesn't look like having any of transition information and mapping to "Asia/Hong_Kong". enter image description here

Thanks a lot for any help!

afdsdsafadwer
  • 67
  • 1
  • 8

1 Answers1

0

Historical data in the Windows registry time zone data is only guaranteed from 2010 forward (per note in the table on the Microsoft TZ/DST policy page). There are a few with earlier information, but nowhere going back into the 1940's.

If you want older historical information, you must use IANA time zones, not Windows time zones. Do keep in mind that IANA time zones represent historical time consistently only since 1970, though some time zones have earlier information when available.

As far as how to use IANA data on Windows, that depends very much on which programming language you are working with. There are many different libraries (such as Noda Time for .NET), or you could use the built-in Windows.Globalization.Calendar WinRT/UWP API, or you could use Windows ICU support and one of the ICU ucal_ APIs. If you're specifically interested in the transitions, I recommend NodaTime.

Matt Johnson-Pint
  • 230,703
  • 74
  • 448
  • 575