[Mono-bugs] [Bug 71682][Wis] Changed - Applications hangs on System.TimeZone.GetDaylightChanges()
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Tue, 25 Jan 2005 06:15:15 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by adam.roben@gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=71682
--- shadow/71682 2005-01-24 18:13:07.000000000 -0500
+++ shadow/71682.tmp.28099 2005-01-25 06:15:15.000000000 -0500
@@ -78,6 +78,29 @@
------- Additional Comments From adam.roben@gmail.com 2005-01-24 13:47 -------
The bug is somewhere in System.TimeZone.GetDaylightChanges().
Updating summary to reflect that.
-Adam
+
+------- Additional Comments From adam.roben@gmail.com 2005-01-25 06:15 -------
+The bug is in ves_icall_System_CurrentTimeZone_GetTimeZoneData() in
+mono/mono/metadata/icall.c:4630 in this bit of code (lines 4664-4770):
+
+ memset (&start, 0, sizeof (start));
+ start.tm_mday = 1;
+ start.tm_year = year-1900;
+
+ t = mktime (&start);
+ gmtoff = gmt_offset (&start, t);
+
+mktime() is returning -1 when in America/Mazatlan. This also happens
+when in America/Hermosillo. I believe this is because both of these
+timezones switched from being -8:00UTC to -7:00UTC in 1970. The only
+other timezone I can find in glibc which has a change in 1970 is
+America/Thunder_Bay, which started observing Daylight Saving Time but
+did not switch its UTC offset. So my guess is that America/Mazatlan
+and America/Hermosillo are the only affected timezones.
+
+Now to find a way to get around this problem...
+
+-Adam