Bug 31691 - TimeZoneInfo.GetAdjustmentRules() returns an empty array even if SupportsDaylightSavingTime is true
Summary: TimeZoneInfo.GetAdjustmentRules() returns an empty array even if SupportsDayl...
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: master
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: marcos.henrich
Depends on:
Reported: 2015-07-07 05:40 UTC by af4178a2
Modified: 2015-11-08 08:08 UTC (History)
3 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 for Bug 31691 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description af4178a2 2015-07-07 05:40:58 UTC
For some time zones contained in TimeZoneInfo.GetSystemTimeZones() supporting DST the method GetAdjustmentRules() returns an empty array.

The problem has been observed in Mono (from the offical Mono repository) running on Debian Jessie/Linux 3.19.0. The problem did not exist in Mono 3.2.8+dfsg-10 (from the offical Debian repository).

NUnit test code:

public sealed class TimeZoneInfoFixture
    public void GetAdjustmentRulesWhenSupportsDaylightSavingTime()
        foreach(TimeZoneInfo tz in TimeZoneInfo.GetSystemTimeZones())
                Assert.That(tz.GetAdjustmentRules(), Is.Not.Empty);

Similar problem was reported with bug #3333 (https://bugzilla.xamarin.com/show_bug.cgi?id=3333) in Mono 2.10.x. Unit tests have been added with bug #3333 but it seems they do not cover this case.