How is the Australia/Melbourne and Australia/Victoria treated in NodaTime?

I have started using NodaTime and noticed a little problem.

Based on the wiki page https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

Australia/Melbourne should have dst time shift +11 and non dst time shift +10. In NodaTime it looks like Austrralia/Melbourne is +10/+10.

On wiki Australia/Melbourne is similar to Australia/Victoria But in NodaTime Australia/Victoria is +11/+11

Where to look for source of truth? Is wiki outdated or is NodaTime DB not in sync? Or maybe there is some other fascinating problem happening.

Jon Skeet
people
quotationmark

Where to look for source of truth?

The IANA time zone database is the best source I'm aware of, and that's what Noda Time uses.

If you want to see what the results of that are and have been over time, the tzvalidate page has a list of files, one per IANA release. Each file shows every transition in every time zone between 1900 and 2035.

Now, I'm not seeing the results you are, which suggests you're not using Noda Time correctly. Here's an example:

using NodaTime;
using System;

public class Program
{
    public static void Main(string[] args)
    {
        var zone = DateTimeZoneProviders.Tzdb["Australia/Melbourne"];

        var start = Instant.FromUtc(2015, 1, 1, 0, 0);
        var end = Instant.FromUtc(2020, 1, 1, 0, 0);
        foreach (var interval in zone.GetZoneIntervals(start, end))
        {
            Console.WriteLine($"{interval.Start} - {interval.End}: {interval.WallOffset} {interval.Name}");
        }
    }
}

Output:

2014-10-04T16:00:00Z - 2015-04-04T16:00:00Z: +11 AEDT
2015-04-04T16:00:00Z - 2015-10-03T16:00:00Z: +10 AEST
2015-10-03T16:00:00Z - 2016-04-02T16:00:00Z: +11 AEDT
2016-04-02T16:00:00Z - 2016-10-01T16:00:00Z: +10 AEST
2016-10-01T16:00:00Z - 2017-04-01T16:00:00Z: +11 AEDT
2017-04-01T16:00:00Z - 2017-09-30T16:00:00Z: +10 AEST
2017-09-30T16:00:00Z - 2018-03-31T16:00:00Z: +11 AEDT
2018-03-31T16:00:00Z - 2018-10-06T16:00:00Z: +10 AEST
2018-10-06T16:00:00Z - 2019-04-06T16:00:00Z: +11 AEDT
2019-04-06T16:00:00Z - 2019-10-05T16:00:00Z: +10 AEST
2019-10-05T16:00:00Z - 2020-04-04T16:00:00Z: +11 AEDT

As you can see, it is +10 for standard time and +11 for daylight time.

people

See more on this question at Stackoverflow