Skip to content

Instantly share code, notes, and snippets.

@jskeet
Created March 14, 2018 07:25
Show Gist options
  • Save jskeet/d6723413a01bf0dc4a83066a66cc1c16 to your computer and use it in GitHub Desktop.
Save jskeet/d6723413a01bf0dc4a83066a66cc1c16 to your computer and use it in GitHub Desktop.
Print out zone intervals for Auckland
using System;
using System.IO;
using System.Text;
using NodaTime;
class Test
{
static void Main()
{
var start = Instant.FromUtc(2013, 1, 1, 0, 0);
var end = Instant.FromUtc(2020, 1, 1, 0, 0);
var zone = DateTimeZoneProviders.Tzdb["Pacific/Auckland"];
foreach (var interval in zone.GetZoneIntervals(start, end))
{
Console.WriteLine(interval);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment