Skip to content

Win32 enhance and fix gtimezone

Chun-wei Fan requested to merge win32-enhance-gtimezone into master

Hi,

This MR is open to address the issues in issue 870, as well as to attempt to address the new issues that we have on Windows regarding GTimeZone running on Windows (hence the WIP status for now) as the APIs evolve forward.

Currently, this updates GTimeZone to use MUI sections of the registry, which is provided on Vista and later, so that we can be assured that we get the strings in the language that we need at runtime (instead of being tied to the language version of Windows), and so use the Unicode versions of the Registry query APIs where applicable. This also updates the gdatetime test program to make use of this functionality as needed.

We also fix the identifier assignment on Windows when querying for the timezone rules using the default US DST boundaries when needed (i.e., we are using "Pacific Standard Time" to query the timezone rules).

This will also fix the gdatetime test on Windows, by making sure we are using the English language strings from the registry and making sure we set TZ to a string that is valid on Windows.

This will be applicable to master and glib-2-60 when complete.

With blessings, thank you!

Fixes: #870 (closed)

Edited by Chun-wei Fan

Merge request reports