Skip to content

Instantly share code, notes, and snippets.

@jskeet
Created April 23, 2019 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jskeet/830eb56a22ad8b33d6c61fb552193236 to your computer and use it in GitHub Desktop.
Save jskeet/830eb56a22ad8b33d6c61fb552193236 to your computer and use it in GitHub Desktop.
using System;
using System.Linq;
using NodaTime;
using NodaTime.Extensions;
public class Program
{
public static void Main()
{
var latest = (from zone in DateTimeZoneProviders.Tzdb.GetAllZones()
from interval in zone.GetZoneIntervals(NodaConstants.BclEpoch, Instant.FromUtc(2000,1, 1, 0, 0))
where interval.WallOffset.Seconds % 60 != 0
orderby interval.End descending
select (zone, interval)).First();
Console.WriteLine($"{latest.zone.Id}: {latest.interval.End} ({latest.interval.WallOffset})");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment