Opened 14 years ago
Closed 14 years ago
#20 closed enhancement (fixed)
Derive TimeZoneInformation from TZ
Reported by: | dmik | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | |
Component: | odin | Version: | |
Severity: | Keywords: | ||
Cc: |
Description
Odin does not use TZ to define the Windows time zone (GetTimeZoneInformation() API). Instead, it uses WGSS for the initial TimeZoneInformation setting but WGSS returns GMT on freshly installed systems.
We need to derive TimeZoneInformation from TZ each time when KERNEL32.DLL gets loaded and update it if differs. This will make sure that if the user changes his system time zone setting (via the Clock Synchronization setting or manually in config.sys), it will get picked up by Odin.
Change History (2)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Done in r21535. Tested for Russian and Central European time zones.
Note that if your TZ is incomplete (i.e. misses the DST information), the first Time Zone that partially matches it will be selected which may not match it exactly.
If there is no matching Time Zone found (e.g. your TZ describes a time zone unknown to Windows), then the STD/DST abbreviations will be used as zone names.
If TZ is absent at all, the last detected Time Zone information is preserved.
In order to do that, we need the Windows time zone database. This database lives in the {{{HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones }}} key on real Windows machines.
I suggest that we will borrow it from there, change the Odin installer to populate it during installation at the very same location in the OS/2 registry and then use this database to find a best match based on the user's current TZ setting.
Having this data base in the same place will let other Windows applications to locate it. For example, this is used by Java to detect the current time zone. (Java uses its own database which is neither TZ nor TimeZoneInformation).
Note that the corresponding defect in OpenJDK/2 is http://svn.netlabs.org/java/ticket/27.