Handle newer tzfiles by allowing for the "big bang" transition.
authorEric Erhardt <eerhardt@microsoft.com>
Fri, 14 Aug 2015 21:23:39 +0000 (16:23 -0500)
committerEric Erhardt <eerhardt@microsoft.com>
Tue, 18 Aug 2015 21:53:37 +0000 (14:53 -0700)
commit5edcf20c215c676d22730b03acd02111f55a3be6
treeed9af7a605922c375719d1730ceb84cb61e404bd
parent432932c4255db5bd0206e1536dc9963348b39b06
Handle newer tzfiles by allowing for the "big bang" transition.

In the TZ release 2014c, a new "big bang" transition time was added
to the beginning of the tzfiles. This broke the TimeZoneInfo parsing
logic because the transition time was for 13 billion years ago, which
is unrepresentable by DateTime.

To handle these new transitions, check for times really far in the past and future, and use DateTime.Min/Max to represent them.  Then skip over any DateTime.MinValue times when generating the AdjustmentRules.

Fix https://github.com/dotnet/corefx/issues/2816.

Commit migrated from https://github.com/dotnet/coreclr/commit/dd57af2f2711a4acbdf11be2e29cfd5c2f077cc1
src/coreclr/src/mscorlib/src/System/DateTimeOffset.cs
src/coreclr/src/mscorlib/src/System/TimeZoneInfo.cs