Preallocate the TimeZoneInfo.Utc instance (dotnet/coreclr#8530)
authorJustin Van Patten <jvp@justinvp.com>
Fri, 9 Dec 2016 00:32:56 +0000 (16:32 -0800)
committerTarek Mahmoud Sayed <tarekms@microsoft.com>
Fri, 9 Dec 2016 00:32:56 +0000 (16:32 -0800)
commitaddfecb1fa86b204a34ae787827492ff497d654c
tree1f3b1568f3a58e3d903508dbcacc1f03866fbfce
parentaaf8060b5b8462eaec50841143f6108b0cb75ab5
Preallocate the TimeZoneInfo.Utc instance (dotnet/coreclr#8530)

There doesn't appear to be a good reason why the TimeZoneInfo.Utc
instance needs to be cleared when TimeZoneInfo.ClearCachedData() is
called. Instead, we can pre-allocate and reuse a singleton instance,
obviating the need for the lazy-initialization/locking mechanics.

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