Created
March 14, 2018 07:25
-
-
Save jskeet/d6723413a01bf0dc4a83066a66cc1c16 to your computer and use it in GitHub Desktop.
Print out zone intervals for Auckland
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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