[Bug 51758] New: Wine's time zone information has gaps in "Dynamic DST" causing InvalidTimeZoneException

WineHQ Bugzilla wine-bugs at winehq.org
Wed Sep 15 12:47:18 CDT 2021


https://bugs.winehq.org/show_bug.cgi?id=51758

            Bug ID: 51758
           Summary: Wine's time zone information has gaps in "Dynamic DST"
                    causing InvalidTimeZoneException
           Product: Wine
           Version: 6.17
          Hardware: x86-64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: -unknown
          Assignee: wine-bugs at winehq.org
          Reporter: madewokherd at gmail.com
      Distribution: ---

Hi, since commit 3e370f761a24878ae4047fd7803673d108bea430 wine-mono's test
suite fails in
MonoTests.System.TimeZoneInfoTest+IsDaylightSavingTimeTests:Bug_9664

commit 3e370f761a24878ae4047fd7803673d108bea430
Author: Giovanni Mascellani <gmascellani at codeweavers.com>
Date:   Mon Sep 6 17:36:27 2021 +0200

    tzres: Regenerate TZ data from de facto standard sources.

The test failure:

1) Bug_9664
(MonoTests.System.TimeZoneInfoTest+IsDaylightSavingTimeTests.Bug_9664)
   System.InvalidTimeZoneException : The time zone ID 'Iran Standard Time' was
found on the local computer, but the registry information was corrupt.
  at System.TimeZoneInfo.FindSystemTimeZoneById (System.String id) [0x0009c] in
<2b59a54be42b4db59a5b1855eee0c040>:0
  at MonoTests.System.TimeZoneInfoTest+IsDaylightSavingTimeTests.Bug_9664 ()
[0x00170] in <f77f913a6a434c5597e82a9098fa240c>:0
  at (wrapper managed-to-native)
System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj,
System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder,
System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a]
in <2b59a54be42b4db59a5b1855eee0c040>:0

The code Mono uses to read registry timezones looks for a Dynamic DST entry for
every year between FirstEntry and LastEntry:
https://github.com/mono/corefx/blob/main/src/Common/src/CoreLib/System/TimeZoneInfo.Win32.cs#L618

If one of the entries doesn't exist, it raises that exception.

This was a problem with some timezones before that commit, it just happened to
reveal the problem because it changed "Iran Standard Time" which is used in the
Mono test suite.

To test this, download wine-mono-6.3.0-tests.zip and run
$ wine run-tests.exe
MonoTests.System.TimeZoneInfoTest+IsDaylightSavingTimeTests:Bug_9664

I'd like to create a new testcase that checks all timezones.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list