[tz] Wrong timezone Information provided

Matt Johnson-Pint mattjohnsonpint at gmail.com
Tue Oct 11 00:00:30 UTC 2022


WSL is an environment that runs a Linux distribution, such as Ubuntu.
Within the distribution, tzdata and tzcode from this project are used just
like they would be without WSL.  So from the perspective of this project,
WSL is just Linux.

However, there is a bit of code in WSL itself to set the local time zone
for the Linux environment, based on the Windows local time zone.
Originally, this was done by faking a pseudo time zone entry
in /usr/share/zoneinfo/Msft/localtime and hardlinking it to
/etc/localtime.  The pseudo-zone created lots of problems though, so I
raised a bug about:  https://github.com/microsoft/WSL/issues/3747
That was fixed in Windows 10 19H1.  It now uses the ucal_getDefaultTimeZone
function from ICU to resolve the correct *real* IANA time zone and links
that instead.  (ICU ultimately uses the CLDR windowsZones.xml file to make
that determination.)

-Matt

On Thu, Oct 6, 2022 at 1:26 PM Brooks Harris via tz <tz at iana.org> wrote:

> On 2022-10-06 4:07 PM, Paul Eggert wrote:
> > On 2022-10-06 13:01, Brooks Harris via tz wrote:
> >> Windows derives its time zones from tzdb, mapped through Unicode
> >> Common Locale Data Repository (CLDR):
> >>
> >> GitHub windowsZones.xml
> >>
> https://raw.githubusercontent.com/unicode-org/cldr/master/common/supplemental/windowsZones.xml
> >>
> >>
> >> I believe this file is curated by Microsoft.
> >
> > Yes, as I understand it Microsoft Windows 8.1 and later has data
> > derived from tzdb in its Windows Runtime / Universal Windows Platform
> > classes.
> The time zone information resides in the Windows Registry, at
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones
>
> > There's also Windows Subsystem for Linux, which is shipped by
> > Microsoft and is a virtualized Ubuntu with its own copy of tzdb,
> > though I doubt whether WSL is relevant here.
> >
> I do not have experience with WSL, but its said to run Linux *directly*
> within Windows, not as a virtual machine.
>
> What is the Windows Subsystem for Linux?
> https://learn.microsoft.com/en-us/windows/wsl/about
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mm.icann.org/pipermail/tz/attachments/20221010/2105a1e1/attachment.html>


More information about the tz mailing list