Bug 6468 - System.TimeZoneInfo.GetSystemTimeZones() returns null values
Summary: System.TimeZoneInfo.GetSystemTimeZones() returns null values
Alias: None
Product: Android
Classification: Xamarin
Component: BCL Class Libraries ()
Version: 4.2.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2012-08-08 09:46 UTC by Neal
Modified: 2012-09-11 12:16 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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 Developer Community or GitHub 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.

Related Links:

Description Neal 2012-08-08 09:46:52 UTC

I need to create a timezone picker in my app as I have done for iOS.  I'm using the same code, however, I'm finding that the method below returns null values but also (which I can deal with) strange values such as "Etc" items.

Sample code below which will break in the latest stable as of this writing (4.2.4) targeting API 15 with min sdk 8.

            var timezones = TimeZoneInfo.GetSystemTimeZones();
            int i=0;
            foreach(var zone in timezones)
                Console.WriteLine("{0} - {1}", i, zone.ToString());
Comment 1 Atsushi Eno 2012-09-11 08:58:01 UTC
Thanks for the report. This should be fixed in the next major release.
Comment 2 Atsushi Eno 2012-09-11 12:16:59 UTC
It was e6a6c31 in mono master, for reference.
Comment 3 Atsushi Eno 2012-09-11 12:16:59 UTC
It was e6a6c31 in mono master, for reference.