Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 13707 [details]
registry file with the tiemzone definition with the modified name
Running under Windows 10 with a TimeZone of Mexico Central, I get the following dump (cropped):
exception inside UnhandledException handler: (null)
[ERROR] FATAL UNHANDLED EXCEPTION: System.TimeZoneNotFoundException: Exception o
f type 'System.TimeZoneNotFoundException' was thrown.
at System.TimeZoneInfo.FindSystemTimeZoneById (System.String id) [0x00000] in
at System.TimeZoneInfo.CreateLocal () [0x00000] in <filename unknown>:0
at System.TimeZoneInfo.get_Local () [0x00000] in <filename unknown>:0
at System.TimeZoneInfo.GetDateTimeNowUtcOffsetFromUtc (DateTime time, System.B
oolean& isAmbiguousLocalDst) [0x00000] in <filename unknown>:0
at System.DateTime.get_Now () [0x00000] in <filename unknown>:0
at Mono.WebServer.Log.Logger.Write (LogLevel level, System.String message) [0x
00000] in <filename unknown>:0
Reading the code, TimeZoneInfo gets the name of my TimeZone from the registry correctly, which is:
"Central Standard Time (Mexico)"
but then it trims the value from the left and the right, removing any characters that are not letters or digits (System.TimeZoneInfo.TrimSpecial). This eats up the closing parenthesys in the string and so it can't find the timezone from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones
If I create a copy of my timezone under the name "Central Standard Time (Mexico", the timezone is found, no trouble.
I'm attaching the registry file with the tiemzone definition with the modified name.
Fixed with https://github.com/mono/mono/pull/2703. Thanks for the PR!