You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MingwX64 0.5.0 naively adjusts for daylight savings time for all years, which is mostly correct for the previous century, but not for some of those years and pre-1918:
We use an approach similar to https://learn.microsoft.com/en-us/windows/win32/api/timezoneapi/ns-timezoneapi-dynamic_time_zone_information in our implementation (to my knowledge, it's the only TimeZone API available to us on mingwX64), which queries the Windows registry to obtain timezone information. When I run regedit.exe and open Computer/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/Time Zones/Pacific Standard Time/Dynamic DST, I see just two years of historical data: 2006 and 2007. Anything before that is unspecified.
Linux and MacOS typically provide much more complete information in their timezone databases based on https://data.iana.org/, which is why you see accurate results there.
Short of giving our users an option to use a timezone database other than the system one (#201), I don't think we can do anything about this issue. Just ignoring the Windows registry and always supplying our own version of timezone rules is also questionable, as in our research, we've seen Windows users changing the registry values and relying on those changes.
Running the following code:
MingwX64 0.6.0 doesn't adjust for daylight savings time before 2006:
MingwX64 0.5.0 naively adjusts for daylight savings time for all years, which is mostly correct for the previous century, but not for some of those years and pre-1918:
JVM/iOS/macOS/Linux properly adjust for daylight savings time in the correct years:
The text was updated successfully, but these errors were encountered: