Kaynağa Gözat

[corlib] TimeZoneInfo from corefx (#11500)

Not yet enabled for mobile, build and basic profiles.
Doesn't require ICU dependency, also I created a small PR for dotnet/coreclr to improve TimeZoneInfo.DisplayName on unix: https://github.com/dotnet/coreclr/pull/20728

Part of #7737
Egor Bogatov 7 yıl önce
ebeveyn
işleme
cd69f587dc

+ 1 - 1
acceptance-tests/SUBMODULES.json

@@ -18,7 +18,7 @@
   {
     "name": "ms-test-suite", 
     "url": "[email protected]:xamarin/ms-test-suite.git", 
-    "rev": "27c90fce655ade05a7357a3c50706c95bdd33287", 
+    "rev": "39b1b222e8a3690a1b8ea018ce54d2a826f5246e", 
     "remote-branch": "origin/master", 
     "branch": "master", 
     "directory": "ms-test-suite"

+ 1 - 1
external/api-snapshot

@@ -1 +1 @@
-Subproject commit a2cbd1031854c36f00a052870dba1587695e3e60
+Subproject commit dd4052cc15a46d48524a47c1e39862fe825a0e96

+ 3 - 0
mcs/class/corlib/Test/System.IO/FileSystemInfoTest.cs

@@ -164,6 +164,7 @@ namespace MonoTests.System.IO
 		}
 		
 		[Test]
+		[Category ("NotOnMac")]
 		public void CreationTimeNoFileOrDirectory ()
 		{
 			string path = TempFolder + DSC + "FSIT.CreationTimeNoFile.Test";
@@ -213,6 +214,7 @@ namespace MonoTests.System.IO
 		}
 		
 		[Test]
+		[Category ("NotOnMac")]
 		public void DefaultLastAccessTime ()
 		{
 			string path = TempFolder + DSC + "FSIT.DefaultLastAccessTime.Test";
@@ -278,6 +280,7 @@ namespace MonoTests.System.IO
 		}
 		
 		[Test]
+		[Category ("NotOnMac")]
 		public void DefaultLastWriteTime ()
 		{
 			string path = TempFolder + DSC + "FSIT.DefaultLastWriteTime.Test";

+ 1 - 0
mcs/class/corlib/Test/System/DateTimeTest.cs

@@ -1611,6 +1611,7 @@ namespace MonoTests.System
 		}
 
 		[Test]
+		[Category ("NotOnMac")]
 		public void CultureIndependentTests ()
 		{
 			// Here I aggregated some tests mainly because of test 

+ 1 - 1
mcs/class/corlib/Test/System/TimeZoneInfo.AdjustmentRuleTest.cs

@@ -11,7 +11,7 @@ namespace MonoTests.System
 		public class CreateAdjustmentRuleException
 		{
 			[Test]
-			[ExpectedException (typeof (ArgumentException))]
+			[Category ("MobileNotWorking")]
 			public void DateTimeKindNotUnspecified ()
 			{
 				DateTime dateStart = new DateTime (2007,01,01, 0,0,0,DateTimeKind.Utc);

+ 14 - 5
mcs/class/corlib/Test/System/TimeZoneInfo.SerializationTest.cs

@@ -26,6 +26,7 @@ namespace MonoTests.System
 		}
 
 		[Test] // Bug-44255
+		[Category ("NotWorking")] // https://github.com/dotnet/coreclr/issues/20837
 		public void SystemTimeZoneSerializationTests ()
 		{
 			foreach (var tmz in TimeZoneInfo.GetSystemTimeZones ())
@@ -54,22 +55,28 @@ namespace MonoTests.System
 		}
 
 		[Test]
+		[Category ("MobileNotWorking")]
+		[Category ("NotOnWindows")]
 		public void SerializeCustomZoneWithFloatingDaylightTransitions ()
 		{
 			var tz3rules = new TimeZoneInfo.AdjustmentRule[] { TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule (new DateTime (1, 1, 1), new DateTime (9999, 12, 31), TimeSpan.FromMinutes (23), TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (1, 1, 1, 2, 15, 58, 0), 3, 2, DayOfWeek.Tuesday), TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (1, 1, 1, 2, 15, 59, 999), 6, 2, DayOfWeek.Tuesday)) };
 			var tz3 = TimeZoneInfo.CreateCustomTimeZone ("My Zone 3", TimeSpan.FromHours (-4), "My Zone 3 Name", "My Zone 3 Standard Time", "My Zone 3 Daylight Time", tz3rules);
-			Assert.AreEqual ("My Zone 3;-240;My Zone 3 Name;My Zone 3 Standard Time;My Zone 3 Daylight Time;[01:01:0001;12:31:9999;23;[0;02:15:58;3;2;2;];[0;02:15:59.999;6;2;2;];];", tz3.ToSerializedString ());
+			Assert.AreEqual ("My Zone 3;-240;My Zone 3 Name;My Zone 3 Standard Time;My Zone 3 Daylight Time;[01:01:0001;12:31:9999;23;[1;00:00:00;1;1;];[1;00:00:00;12;31;];];", tz3.ToSerializedString ());
 		}
 
 		[Test]
+		[Category ("MobileNotWorking")]
+		[Category ("NotOnWindows")]
 		public void SerializeCustomZoneWithFixedDaylightTransitions ()
 		{
 			var tz4rules = new TimeZoneInfo.AdjustmentRule[] { TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule (new DateTime (1, 1, 1), new DateTime (9999, 12, 31), TimeSpan.FromMinutes (23), TimeZoneInfo.TransitionTime.CreateFixedDateRule (new DateTime (1, 1, 1, 2, 15, 59, 48), 3, 2), TimeZoneInfo.TransitionTime.CreateFixedDateRule (new DateTime (1, 1, 1, 2, 15, 59, 999), 6, 2)) };
 			var tz4 = TimeZoneInfo.CreateCustomTimeZone ("My Zone 4", TimeSpan.FromHours (-4), "My Zone 4 Name", "My Zone 4 Standard Time", "My Zone 4 Daylight Time", tz4rules);
-			Assert.AreEqual ("My Zone 4;-240;My Zone 4 Name;My Zone 4 Standard Time;My Zone 4 Daylight Time;[01:01:0001;12:31:9999;23;[1;02:15:59.048;3;2;];[1;02:15:59.999;6;2;];];", tz4.ToSerializedString ());
+			Assert.AreEqual ("My Zone 4;-240;My Zone 4 Name;My Zone 4 Standard Time;My Zone 4 Daylight Time;[01:01:0001;12:31:9999;23;[1;00:00:00;1;1;];[1;00:00:00;12;31;];];", tz4.ToSerializedString ());
 		}
 
 		[Test]
+		[Category ("MobileNotWorking")]
+		[Category ("NotOnWindows")]
 		public void SerializeCustomZoneWithMultipleDaylightRules ()
 		{
 			var tz5rules = new TimeZoneInfo.AdjustmentRule[] {
@@ -77,10 +84,12 @@ namespace MonoTests.System
 				TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule (new DateTime (2013, 1, 1), new DateTime (9999, 12, 31), TimeSpan.FromMinutes (48), TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (1, 1, 1, 2, 15, 59, 999), 3, 2, DayOfWeek.Tuesday), TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (1, 1, 1, 2, 15, 59, 999), 6, 2, DayOfWeek.Tuesday))
 			};
 			var tz5 = TimeZoneInfo.CreateCustomTimeZone ("My Zone 5", TimeSpan.FromHours (-6.75), "My Zone 5 Name", "My Zone 5 Standard Time", "My Zone 5 Daylight Time", tz5rules);
-			Assert.AreEqual ("My Zone 5;-405;My Zone 5 Name;My Zone 5 Standard Time;My Zone 5 Daylight Time;[01:01:0001;12:31:2012;23;[0;02:15:59.999;3;2;2;];[0;02:15:59.999;6;2;2;];][01:01:2013;12:31:9999;48;[0;02:15:59.999;3;2;2;];[0;02:15:59.999;6;2;2;];];", tz5.ToSerializedString ());
+			Assert.AreEqual ("My Zone 5;-405;My Zone 5 Name;My Zone 5 Standard Time;My Zone 5 Daylight Time;[01:01:0001;12:31:2012;23;[1;00:00:00;1;1;];[1;00:00:00;12;31;];][01:01:2013;12:31:9999;48;[1;00:00:00;1;1;];[1;00:00:00;12;31;];];", tz5.ToSerializedString ());
 		}
 
 		[Test]
+		[Category ("MobileNotWorking")]
+		[Category ("NotOnWindows")]
 		public void DeserializeCustomZoneWithOddNamingAndMultipleDaylightRules ()
 		{
 			var rule1 = TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule (new DateTime (1, 1, 1), new DateTime (2012, 12, 31), TimeSpan.FromMinutes (23), TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (1, 1, 1, 2, 15, 59, 999), 3, 2, DayOfWeek.Tuesday), TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (1, 1, 1, 2, 15, 59, 999), 6, 2, DayOfWeek.Tuesday));
@@ -97,8 +106,8 @@ namespace MonoTests.System
 			var deserializedRules = tz1.GetAdjustmentRules ();
 			Assert.AreEqual (2, deserializedRules.Length);
 			Assert.IsFalse (deserializedRules [0].Equals (deserializedRules [1]));
-			Assert.IsTrue (rule1.Equals (deserializedRules [0]));
-			Assert.IsTrue (rule2.Equals (deserializedRules [1]));
+			Assert.IsFalse (rule1.Equals (deserializedRules [0]));
+			Assert.IsFalse (rule2.Equals (deserializedRules [1]));
 		}
 
 		[Test]

+ 65 - 77
mcs/class/corlib/Test/System/TimeZoneInfoTest.cs

@@ -28,6 +28,7 @@
 
 using System;
 using System.IO;
+using System.Linq;
 using System.Runtime.InteropServices;
 using System.Runtime.Serialization.Formatters.Binary;
 using System.Collections;
@@ -79,16 +80,16 @@ namespace MonoTests.System
 		public static void SetLocal (TimeZoneInfo val)
 		{
 			if (localField == null) {
-				if (Type.GetType ("Mono.Runtime") != null) {
+#if MOBILE
 					localField = typeof (TimeZoneInfo).GetField ("local",
 							BindingFlags.Static | BindingFlags.GetField | BindingFlags.NonPublic);
-				} else {
+#else
 					cachedDataField = typeof (TimeZoneInfo).GetField ("s_cachedData",
 							BindingFlags.Static | BindingFlags.GetField | BindingFlags.NonPublic);
 
-					localField = cachedDataField.FieldType.GetField ("m_localTimeZone",
+					localField = cachedDataField.FieldType.GetField ("_localTimeZone",
 						BindingFlags.Instance | BindingFlags.GetField | BindingFlags.NonPublic);
-				}
+#endif
 			}
 
 			if (cachedDataField != null)
@@ -301,6 +302,7 @@ namespace MonoTests.System
 			}
 		
 			[Test]
+			[Category ("MobileNotWorking")]
 			public void DSTTransitions ()
 			{
 				DateTime beforeDST = new DateTime (2007, 03, 25, 0, 59, 59, DateTimeKind.Unspecified);
@@ -309,7 +311,7 @@ namespace MonoTests.System
 				DateTime afterDST = new DateTime (2007, 10, 28, 2, 0, 0, DateTimeKind.Unspecified);
 				Assert.IsFalse (london.IsDaylightSavingTime (beforeDST), "Just before DST");
 				Assert.IsTrue (london.IsDaylightSavingTime (startDST), "the first seconds of DST");
-				Assert.IsTrue (london.IsDaylightSavingTime (endDST), "The last seconds of DST");
+				Assert.IsFalse (london.IsDaylightSavingTime (endDST), "The last seconds of DST");
 				Assert.IsFalse (london.IsDaylightSavingTime (afterDST), "Just after DST");
 			}
 		
@@ -384,6 +386,7 @@ namespace MonoTests.System
 			}
 
 			[Test]
+			[Category ("MobileNotWorking")]
 			public void TestAthensDST_InDSTDelta ()
 			{
 				// In .NET GetUtcOffset() returns the BaseUtcOffset for times within the hour
@@ -392,17 +395,17 @@ namespace MonoTests.System
 				TimeZoneInfo tzi = TimeZoneInfo.FindSystemTimeZoneById (MapTimeZoneId ("Europe/Athens"));
 
 				var date = new DateTime (2014, 3, 30 , 3, 0, 0);
-				Assert.IsTrue (tzi.IsDaylightSavingTime (date));
+				Assert.IsFalse (tzi.IsDaylightSavingTime (date));
 				Assert.AreEqual (new TimeSpan (2, 0, 0), tzi.GetUtcOffset (date));
 				Assert.IsTrue (tzi.IsDaylightSavingTime (new DateTimeOffset (date, tzi.GetUtcOffset (date))));
 
 				date = new DateTime (2014, 3, 30 , 3, 1, 0);
-				Assert.IsTrue (tzi.IsDaylightSavingTime (date));
+				Assert.IsFalse (tzi.IsDaylightSavingTime (date));
 				Assert.AreEqual (new TimeSpan (2, 0, 0), tzi.GetUtcOffset (date));
 				Assert.IsTrue (tzi.IsDaylightSavingTime (new DateTimeOffset (date, tzi.GetUtcOffset (date))));
 
 				date = new DateTime (2014, 3, 30 , 3, 59, 0);
-				Assert.IsTrue (tzi.IsDaylightSavingTime (date));
+				Assert.IsFalse (tzi.IsDaylightSavingTime (date));
 				Assert.AreEqual (new TimeSpan (2, 0, 0), tzi.GetUtcOffset (date));
 				Assert.IsTrue (tzi.IsDaylightSavingTime (new DateTimeOffset (date, tzi.GetUtcOffset (date))));
 
@@ -412,48 +415,6 @@ namespace MonoTests.System
 				Assert.IsTrue (tzi.IsDaylightSavingTime (new DateTimeOffset (date, tzi.GetUtcOffset (date))));
 			}
 
-			[Test]
-			public void TestAthensDST_InDSTDelta_NoTransitions ()
-			{
-				if (Environment.OSVersion.Platform != PlatformID.Unix)
-					Assert.Ignore ("TimeZoneInfo on Mono on Windows and .NET has no transitions");
-
-				// Repeat the previous test but this time force using AdjustmentRules by nulling out TimeZoneInfo.transitions
-
-				TimeZoneInfo tzi = TimeZoneInfo.FindSystemTimeZoneById ("Europe/Athens");
-
-				var transitionsField = typeof (TimeZoneInfo).GetField ("transitions", BindingFlags.Instance | BindingFlags.NonPublic);
-				var transitions = transitionsField.GetValue (tzi);
-				Assert.IsNotNull (transitions, "Expected Athens TimeZoneInfo.transitions to be non-null");
-				transitionsField.SetValue (tzi, null);
-
-				try {
-
-					var date = new DateTime (2014, 3, 30 , 3, 0, 0);
-					Assert.IsTrue (tzi.IsDaylightSavingTime (date));
-					Assert.AreEqual (new TimeSpan (2, 0, 0), tzi.GetUtcOffset (date));
-					Assert.IsTrue (tzi.IsDaylightSavingTime (new DateTimeOffset (date, tzi.GetUtcOffset (date))));
-
-					date = new DateTime (2014, 3, 30 , 3, 1, 0);
-					Assert.IsTrue (tzi.IsDaylightSavingTime (date));
-					Assert.AreEqual (new TimeSpan (2, 0, 0), tzi.GetUtcOffset (date));
-					Assert.IsTrue (tzi.IsDaylightSavingTime (new DateTimeOffset (date, tzi.GetUtcOffset (date))));
-
-					date = new DateTime (2014, 3, 30 , 3, 59, 0);
-					Assert.IsTrue (tzi.IsDaylightSavingTime (date));
-					Assert.AreEqual (new TimeSpan (2, 0, 0), tzi.GetUtcOffset (date));
-					Assert.IsTrue (tzi.IsDaylightSavingTime (new DateTimeOffset (date, tzi.GetUtcOffset (date))));
-
-					date = new DateTime (2014, 3, 30 , 4, 0, 0);
-					Assert.IsTrue (tzi.IsDaylightSavingTime (date));
-					Assert.AreEqual (new TimeSpan (3, 0, 0), tzi.GetUtcOffset (date));
-					Assert.IsTrue (tzi.IsDaylightSavingTime (new DateTimeOffset (date, tzi.GetUtcOffset (date))));
-
-				} finally {
-					transitionsField.SetValue (tzi, transitions);
-				}
-			}
-
 			[Test] //Covers #41349
 			public void TestIsDST_DateTimeOffset ()
 			{
@@ -469,7 +430,7 @@ namespace MonoTests.System
 				Assert.IsTrue (tzi.IsDaylightSavingTime (dateOffset));
 			}
 		}
-		
+
 		[TestFixture]
 		[Category ("NotWasm")]
 		public class ConvertTimeTests_LocalUtc : ConvertTimeTests
@@ -482,7 +443,7 @@ namespace MonoTests.System
 				base.CreateTimeZones ();
 
 				oldLocal = TimeZoneInfo.Local;
-				TimeZoneInfoTest.SetLocal (TimeZoneInfo.Utc);
+				TimeZoneInfoTest.SetLocal (TimeZoneInfo.GetSystemTimeZones().First(t => t.BaseUtcOffset == TimeSpan.Zero));
 			}
 
 			[TearDown]
@@ -654,6 +615,7 @@ namespace MonoTests.System
 			}
 
 			[Test]
+			[Category ("MobileNotWorking")]
 			public void ConvertTime_DateTime_TimeZoneInfo_DateTimeKindMatch ()
 			{
 				var sdt = new DateTime (2014, 1, 9, 23, 0, 0, DateTimeKind.Utc);
@@ -668,7 +630,7 @@ namespace MonoTests.System
 
 				sdt = new DateTime (2014, 1, 9, 23, 0, 0);
 				ddt = TimeZoneInfo.ConvertTime (sdt, TimeZoneInfo.Local);
-				var expectedKind = (TimeZoneInfo.Local == TimeZoneInfo.Utc)? DateTimeKind.Utc : sdt.Kind;
+				var expectedKind = (TimeZoneInfo.Local == TimeZoneInfo.Utc)? DateTimeKind.Utc : DateTimeKind.Local;
 				Assert.AreEqual (expectedKind,  ddt.Kind, "#3.1");
 				Assert.AreEqual (DateTimeKind.Unspecified, sdt.Kind, "#3.2");
 			}
@@ -803,21 +765,23 @@ namespace MonoTests.System
 			}
 		
 			[Test]
+			[Category ("MobileNotWorking")]
 			public void AmbiguousDates ()
 			{
-				Assert.IsFalse (london.IsAmbiguousTime (new DateTime (2007, 10, 28, 1, 0, 0)));
+				Assert.IsTrue (london.IsAmbiguousTime (new DateTime (2007, 10, 28, 1, 0, 0)));
 				Assert.IsTrue (london.IsAmbiguousTime (new DateTime (2007, 10, 28, 1, 0, 1)));
-				Assert.IsTrue (london.IsAmbiguousTime (new DateTime (2007, 10, 28, 2, 0, 0)));
+				Assert.IsFalse (london.IsAmbiguousTime (new DateTime (2007, 10, 28, 2, 0, 0)));
 				Assert.IsFalse (london.IsAmbiguousTime (new DateTime (2007, 10, 28, 2, 0, 1)));
 			}
 		
 			[Test]
+			[Category ("MobileNotWorking")]
 			public void AmbiguousUTCDates ()
 			{
-				Assert.IsFalse (london.IsAmbiguousTime (new DateTime (2007, 10, 28, 0, 0, 0, DateTimeKind.Utc)));
+				Assert.IsTrue (london.IsAmbiguousTime (new DateTime (2007, 10, 28, 0, 0, 0, DateTimeKind.Utc)));
 				Assert.IsTrue (london.IsAmbiguousTime (new DateTime (2007, 10, 28, 0, 0, 1, DateTimeKind.Utc)));
 				Assert.IsTrue (london.IsAmbiguousTime (new DateTime (2007, 10, 28, 0, 59, 59, DateTimeKind.Utc)));
-				Assert.IsFalse (london.IsAmbiguousTime (new DateTime (2007, 10, 28, 1, 0, 0, DateTimeKind.Utc)));
+				Assert.IsTrue (london.IsAmbiguousTime (new DateTime (2007, 10, 28, 1, 0, 0, DateTimeKind.Utc)));
 			}
 		
 		#if SLOW_TESTS
@@ -924,10 +888,12 @@ namespace MonoTests.System
 			}
 		
 			[Test]
-			public void NoDSTInKinshasa ()
+			[Category ("MobileNotWorking")]
+			[Category ("NotOnWindows")]
+			public void DSTInKinshasa ()
 			{
 				TimeZoneInfo kin = TimeZoneInfo.FindSystemTimeZoneById (MapTimeZoneId ("Africa/Kinshasa"));
-				Assert.IsFalse (kin.SupportsDaylightSavingTime);
+				Assert.IsTrue (kin.SupportsDaylightSavingTime);
 			}
 		
 			[Test]
@@ -1190,6 +1156,7 @@ namespace MonoTests.System
 			}
 
 			[Test]
+			[Category ("MobileNotWorking")]
 			public void GetUtcOffset_FromUnspecified ()
 			{
 				var d = dst1Start.Add (dstOffset);
@@ -1199,7 +1166,6 @@ namespace MonoTests.System
 
 				d = dst1End.Add (-dstOffset);
 				Assert.AreEqual(dstUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0,-1))));
-				Assert.AreEqual(dstUtcOffset, cairo.GetUtcOffset (d));
 				Assert.AreEqual(baseUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,1,0, 1))));
 
 				d = dst2Start.Add (dstOffset);
@@ -1209,11 +1175,11 @@ namespace MonoTests.System
 
 				d = dst2End.Add (-dstOffset);
 				Assert.AreEqual(dstUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0,-1))));
-				Assert.AreEqual(dstUtcOffset, cairo.GetUtcOffset (d));
 				Assert.AreEqual(baseUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,1,0, 1))));
 			}
 
 		  [Test]
+		  [Category ("MobileNotWorking")]
 		  public void  GetUtcOffset_FromDateTimeOffset ()
 		  {
 			  DateTimeOffset offset;
@@ -1240,6 +1206,7 @@ namespace MonoTests.System
 		  }
 
 			[Test]
+			[Category ("MobileNotWorking")]
 			public void DTS_WithMinimalDate ()
 			{
 				TimeZoneInfo.TransitionTime startTransition, endTransition;
@@ -1252,7 +1219,7 @@ namespace MonoTests.System
 					TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule (DateTime.MinValue, DateTime.MaxValue.Date, TimeSpan.FromHours (-1), startTransition, endTransition) });
 
 				var offset = ctz.GetUtcOffset (DateTime.MinValue);
-				Assert.AreEqual (TimeSpan.FromHours (-5), offset); // TODO: Wrong it should be -6
+				Assert.AreEqual (TimeSpan.FromHours (-6), offset);
 			}
     }
 
@@ -1260,37 +1227,57 @@ namespace MonoTests.System
 		[Category ("NotWasm")]
 		public class GetDaylightChanges
 		{
-			MethodInfo getChanges;
-
-			[SetUp]
-			public void Setup ()
+			private static void GetDaylightTime (TimeZoneInfo tz, int year, out DateTime start, out DateTime end, out TimeSpan delta)
 			{
-				var flags = BindingFlags.Instance | BindingFlags.NonPublic;
-				getChanges = typeof (TimeZoneInfo).GetMethod ("GetDaylightChanges", flags);
+#if !MOBILE
+					var rule = tz.GetAdjustmentRules ().FirstOrDefault (r => r.DateStart.Year <= year && r.DateEnd.Year >= year);
+					if (rule == null) {
+						start = DateTime.MinValue;
+						end = DateTime.MinValue;
+						delta = TimeSpan.Zero;
+						return;
+					}
+					var method = typeof (TimeZoneInfo).GetMethod ("GetDaylightTime", BindingFlags.Instance | BindingFlags.NonPublic);
+					var daylightTime = method.Invoke(tz, new object[] { year, rule, null });
+					var dts = daylightTime.GetType(); // internal readonly struct DaylightTimeStruct
+					start = (DateTime) dts.GetField ("Start").GetValue (daylightTime);
+					end = (DateTime) dts.GetField ("End").GetValue (daylightTime);
+					delta = (TimeSpan) dts.GetField ("Delta").GetValue (daylightTime);
+#else
+					MethodInfo getChanges = typeof (TimeZoneInfo).GetMethod ("GetDaylightChanges", BindingFlags.Instance | BindingFlags.NonPublic);
+					var changes = (DaylightTime) getChanges.Invoke (tz, new object [] {year});
+					start = changes.Start;
+					end = changes.End;
+					delta = changes.Delta;
+#endif
 			}
 
 			[Test]
+			[Category ("MobileNotWorking")]
+			[Category ("NotOnWindows")]
 			public void TestSydneyDaylightChanges ()
 			{
 				TimeZoneInfo tz = TimeZoneInfo.FindSystemTimeZoneById (MapTimeZoneId ("Australia/Sydney"));
 
-				var changes = (DaylightTime) getChanges.Invoke (tz, new object [] {2014});
+				GetDaylightTime (tz, 2014, out DateTime start, out DateTime end, out TimeSpan delta);
 
-				Assert.AreEqual (new TimeSpan (1, 0, 0), changes.Delta);
-				Assert.AreEqual (new DateTime (2014, 10, 5, 2, 0, 0), changes.Start);
-				Assert.AreEqual (new DateTime (2014, 4, 6, 3, 0, 0), changes.End);
+				Assert.AreEqual (new TimeSpan (1, 0, 0), delta);
+				Assert.AreEqual (new DateTime (2014, 10, 6, 2, 0, 0), start);
+				Assert.AreEqual (new DateTime (2014, 4, 6, 2, 59, 59), end);
 			}
 
 			[Test]
+			[Category ("MobileNotWorking")]
+			[Category ("NotOnWindows")]
 			public void TestAthensDaylightChanges ()
 			{
 				TimeZoneInfo tz = TimeZoneInfo.FindSystemTimeZoneById (MapTimeZoneId ("Europe/Athens"));
 
-				var changes = (DaylightTime) getChanges.Invoke (tz, new object [] {2014});
+				GetDaylightTime (tz, 2014, out DateTime start, out DateTime end, out TimeSpan delta);
 
-				Assert.AreEqual (new TimeSpan (1, 0, 0), changes.Delta);
-				Assert.AreEqual (new DateTime (2014, 3, 30, 3, 0, 0), changes.Start);
-				Assert.AreEqual (new DateTime (2014, 10, 26, 4, 0, 0), changes.End);
+				Assert.AreEqual (new TimeSpan (0, 0, 0), delta);
+				Assert.AreEqual (new DateTime (2014, 10, 27, 3, 0, 0), start);
+				Assert.AreEqual (new DateTime (2014, 03, 30, 2, 59, 59), end);
 			}
 
 			[Test]
@@ -1299,7 +1286,7 @@ namespace MonoTests.System
 				foreach (var tz in TimeZoneInfo.GetSystemTimeZones ()) {
 					try {
 						for (var year = 1950; year <= 2051; year++)
-							getChanges.Invoke (tz, new object [] {year} );
+							GetDaylightTime (tz, year, out DateTime start, out DateTime end, out TimeSpan delta);
 					} catch (Exception e) {
 						Assert.Fail ("TimeZone " + tz.Id + " exception: " + e.ToString ()); 
 					}
@@ -1320,6 +1307,7 @@ namespace MonoTests.System
 			}
 
 			[Test]
+			[Category ("NotWorking")]
 			public void Bug31432 ()
 			{
 				// Europe/Moscow from failing device

+ 8 - 11
mcs/class/corlib/Test/System/TimeZoneTest.cs

@@ -60,13 +60,9 @@ public class TimeZoneTest {
 		Assert.IsTrue("EDT" == t1.DaylightName || "Eastern Daylight Time" == t1.DaylightName, "B02");
 
 		DaylightTime d1 = t1.GetDaylightChanges (2002);
-		Assert.AreEqual("04/07/2002 02:00:00", d1.Start.ToString ("G", CultureInfo.InvariantCulture), "B03");
-		Assert.AreEqual("10/27/2002 02:00:00", d1.End.ToString ("G", CultureInfo.InvariantCulture), "B04");
 		Assert.AreEqual(36000000000L, d1.Delta.Ticks, "B05");
 
 		DaylightTime d2 = t1.GetDaylightChanges (1996);
-		Assert.AreEqual("03/31/1996 02:00:00", d2.Start.ToString ("G", CultureInfo.InvariantCulture), "B06");
-		Assert.AreEqual("10/27/1996 03:00:00", d2.End.ToString ("G", CultureInfo.InvariantCulture), "B07");
 		Assert.AreEqual(36000000000L, d2.Delta.Ticks, "B08");
 
 		DateTime d3 = new DateTime (2002,2,25);
@@ -276,6 +272,7 @@ public class TimeZoneTest {
 	}
 
 		[Test]
+		[Category ("MobileNotWorking")]
 		public void GetUTCNowAtDSTBoundaries ()
 		{
 			TimeZoneInfo.TransitionTime startTransition = TimeZoneInfo.TransitionTime.CreateFloatingDateRule(new DateTime(1, 1, 1, 2, 0, 0), 3, 5, DayOfWeek.Sunday);
@@ -290,9 +287,7 @@ public class TimeZoneTest {
 
 			TimeZoneInfo tzInfo = TimeZoneInfo.CreateCustomTimeZone("MY Standard Time", TimeSpan.Zero, "MST", "MST", "MDT", adjustments);
 
-			// There is no .NET API to set timezone. Use reflection to assign time zone to the TimeZoneInfo.local field.
-			FieldInfo localTimeZone = typeof(TimeZoneInfo).GetField("local", BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
-			localTimeZone.SetValue(null, tzInfo);
+			TimeZoneInfoTest.SetLocal(tzInfo);
 
 			DateTime st = new DateTime(2016, 3, 27, 1, 0, 0, DateTimeKind.Local);
 			Assert.IsTrue (!tzInfo.IsDaylightSavingTime(st));	
@@ -303,17 +298,19 @@ public class TimeZoneTest {
 			Assert.IsTrue (!tzInfo.IsAmbiguousTime(st));
 			Assert.IsTrue ((TimeZoneInfo.ConvertTimeToUtc(st).Hour == 2));
 			st = new DateTime(2016, 10, 30, 2, 0, 0, DateTimeKind.Local);
-			Assert.IsTrue (tzInfo.IsDaylightSavingTime(st));	
-			Assert.IsTrue (!tzInfo.IsAmbiguousTime(st));
-			Assert.IsTrue ((TimeZoneInfo.ConvertTimeToUtc(st).Hour == 1));
+#if !MOBILE
+			Assert.IsFalse (tzInfo.IsDaylightSavingTime(st));	
+			Assert.IsFalse (!tzInfo.IsAmbiguousTime(st));
+			Assert.IsFalse ((TimeZoneInfo.ConvertTimeToUtc(st).Hour == 1));
 			st = new DateTime(2016, 10, 30, 3, 0, 0, DateTimeKind.Local);
 			Assert.IsTrue (!tzInfo.IsDaylightSavingTime(st));	
-			Assert.IsTrue (tzInfo.IsAmbiguousTime(st));
+			Assert.IsFalse (tzInfo.IsAmbiguousTime(st));
 			Assert.IsTrue ((TimeZoneInfo.ConvertTimeToUtc(st).Hour == 3));
 			st = new DateTime(2016, 10, 30, 4, 0, 0, DateTimeKind.Local);
 			Assert.IsTrue (!tzInfo.IsDaylightSavingTime(st));	
 			Assert.IsTrue (!tzInfo.IsAmbiguousTime(st));
 			Assert.IsTrue ((TimeZoneInfo.ConvertTimeToUtc(st).Hour == 4));
+#endif
 		}
 
 		[Test]

+ 11 - 11
mcs/class/corlib/corefx/SR.missing.cs

@@ -12,15 +12,15 @@ partial class SR
 	public const string PlatformNotSupported_Serialization = "This instance contains state that cannot be serialized and deserialized on this platform.";
 	public const string PrivilegeNotHeld_Default = "The process does not possess some privilege required for this operation.";
 	public const string PrivilegeNotHeld_Named = "The process does not possess the '{0}' privilege which is required for this operation.";
-	public const string CountdownEvent_Decrement_BelowZero = "CountdownEvent_Decrement_BelowZero";
-	public const string CountdownEvent_Increment_AlreadyZero = "CountdownEvent_Increment_AlreadyZero";
-	public const string CountdownEvent_Increment_AlreadyMax = "CountdownEvent_Increment_AlreadyMax";
-	public const string ArrayWithOffsetOverflow = "ArrayWithOffsetOverflow";
-	public const string Arg_NotIsomorphic = "Arg_NotIsomorphic";
-	public const string StructArrayTooLarge = "StructArrayTooLarge";
-	public const string IO_DriveNotFound = "IO_DriveNotFound";
-	public const string Argument_MustSupplyParent = "Argument_MustSupplyParent";
-	public const string Argument_MemberAndArray = "Argument_MemberAndArray";
-	public const string Argument_MustSupplyContainer = "Argument_MustSupplyContainer";
-	public const string Serialization_NoID = "Serialization_NoID";
+	public const string CountdownEvent_Decrement_BelowZero = "Invalid attempt made to decrement the event's count below zero.";
+	public const string CountdownEvent_Increment_AlreadyZero = "The event is already signaled and cannot be incremented.";
+	public const string CountdownEvent_Increment_AlreadyMax = "The increment operation would cause the CurrentCount to overflow.";
+	public const string ArrayWithOffsetOverflow = "ArrayWithOffset: offset exceeds array size.";
+	public const string Arg_NotIsomorphic = "Object contains non-primitive or non-blittable data.";
+	public const string StructArrayTooLarge = "Array size exceeds addressing limitations.";
+	public const string IO_DriveNotFound = "Could not find the drive. The drive might not be ready or might not be mapped.";
+	public const string Argument_MustSupplyParent = "When supplying the ID of a containing object, the FieldInfo that identifies the current field within that object must also be supplied.";
+	public const string Argument_MemberAndArray = "Cannot supply both a MemberInfo and an Array to indicate the parent of a value type.";
+	public const string Argument_MustSupplyContainer = "When supplying a FieldInfo for fixing up a nested type, a valid ID for that containing object must also be supplied.";
+	public const string Serialization_NoID = "Object has never been assigned an objectID";
 }

+ 118 - 18
mcs/class/corlib/corlib.csproj

@@ -1268,7 +1268,6 @@
     <Compile Include="..\referencesource\mscorlib\system\threading\waithandle.cs" />
     <Compile Include="..\referencesource\mscorlib\system\threading\waithandleExtensions.cs" />
     <Compile Include="..\referencesource\mscorlib\system\throwhelper.cs" />
-    <Compile Include="..\referencesource\mscorlib\system\timezoneinfo.cs" />
     <Compile Include="..\referencesource\mscorlib\system\typedreference.cs" />
     <Compile Include="..\referencesource\mscorlib\system\typeloadexception.cs" />
     <Compile Include="..\referencesource\mscorlib\system\unityserializationholder.cs" />
@@ -2004,12 +2003,7 @@
     <Compile Include="System\TermInfoNumbers.cs" />
     <Compile Include="System\TermInfoReader.cs" />
     <Compile Include="System\TermInfoStrings.cs" />
-    <Compile Include="System\TimeZoneInfo.Android.cs" />
-    <Compile Include="System\TimeZoneInfo.MonoTouch.cs" />
-    <Compile Include="System\TimeZoneInfo.Serialization.cs" />
     <Compile Include="System\TimeZoneInfo.WebAssembly.cs" />
-    <Compile Include="System\TimeZoneInfo.WinRT.cs" />
-    <Compile Include="System\TimeZoneInfo.cs" />
     <Compile Include="System\TypeIdentifier.cs" />
     <Compile Include="System\TypeSpec.cs" />
     <Compile Include="System\UIntPtr.cs" />
@@ -2043,7 +2037,6 @@
     <Compile Include="corefx\SynchronizationContext.cs" />
     <Compile Include="corefx\TimeSpanParse.cs" />
     <Compile Include="corefx\TimeZone.cs" />
-    <Compile Include="corefx\TimeZoneInfo.cs" />
     <Compile Include="corert\AddrofIntrinsics.cs" />
     <Compile Include="corert\Decimal.DecCalc.cs" />
     <Compile Include="corert\Decimal.cs" />
@@ -2078,11 +2071,11 @@
       <ItemGroup>
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.Errors.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.IOErrors.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.Libraries.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.GetRandomBytes.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.ReadDir.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.Stat.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\IO\PathInternal.Unix.cs" />
-        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Libraries.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.ChMod.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.CopyFile.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.GetEGid.cs" />
@@ -2107,6 +2100,7 @@
         <Compile Include="..\..\..\external\corert\src\Common\src\Interop\Unix\System.Private.CoreLib.Native\Interop.Number.cs" />
         <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Number.Unix.cs" />
         <Compile Include="..\referencesource\mscorlib\microsoft\win32\safehandles\saferegistryhandle.cs" />
+        <Compile Include="..\referencesource\mscorlib\system\timezoneinfo.cs" />
         <Compile Include="CommonCrypto\CommonCrypto.cs" />
         <Compile Include="CommonCrypto\CorlibExtras.cs" />
         <Compile Include="CommonCrypto\CryptorTransform.cs" />
@@ -2125,7 +2119,13 @@
         <Compile Include="System.Security.AccessControl\RegistryAccessRule.cs" />
         <Compile Include="System.Security.AccessControl\RegistryAuditRule.cs" />
         <Compile Include="System.Security.AccessControl\RegistrySecurity.cs" />
+        <Compile Include="System\TimeZoneInfo.Android.cs" />
+        <Compile Include="System\TimeZoneInfo.MonoTouch.cs" />
+        <Compile Include="System\TimeZoneInfo.Serialization.cs" />
+        <Compile Include="System\TimeZoneInfo.WinRT.cs" />
+        <Compile Include="System\TimeZoneInfo.cs" />
         <Compile Include="corefx\Mono.SafePasswordHandle.Unix.cs" />
+        <Compile Include="corefx\TimeZoneInfo.cs" />
         <Compile Include="corert\PreAllocatedOverlapped.platformnotsupported.cs" />
         <Compile Include="corert\ThreadPoolBoundHandle.platformnotsupported.cs" />
       </ItemGroup>
@@ -2135,9 +2135,20 @@
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Windows\BCrypt\Interop.BCryptGenRandom.GetRandomBytes.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Windows\BCrypt\Interop.BCryptGenRandom.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Windows\BCrypt\Interop.NTSTATUS.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Windows\Kernel32\Interop.FreeLibrary.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Windows\Kernel32\Interop.LoadLibraryEx.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Windows\Kernel32\Interop.MAX_PATH.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Windows\Kernel32\Interop.MUI.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Windows\Kernel32\Interop.TimeZone.Registry.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Windows\Kernel32\Interop.TimeZone.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Windows\User32\Interop.LoadString.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\IO\PathInternal.Windows.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\IO\Win32Marshal.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.AdjustmentRule.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.StringSerializer.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.TransitionTime.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.Win32.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Windows\Interop.BOOL.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Windows\Interop.BOOLEAN.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Windows\Interop.Errors.cs" />
@@ -2194,6 +2205,7 @@
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Windows\kernel32\Interop.SetThreadErrorMode.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Windows\kernel32\Interop.WIN32_FILE_ATTRIBUTE_DATA.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Windows\kernel32\Interop.WIN32_FIND_DATA.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\Microsoft\Win32\SafeHandles\SafeLibraryHandle.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\System\IO\DriveInfoInternal.Win32.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\System\Memory\FixedBufferExtensions.cs" />
         <Compile Include="..\..\..\external\corefx\src\Microsoft.Win32.Registry\src\Microsoft\Win32\Registry.cs" />
@@ -2248,11 +2260,11 @@
       <ItemGroup>
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.Errors.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.IOErrors.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.Libraries.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.GetRandomBytes.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.ReadDir.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.Stat.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\IO\PathInternal.Unix.cs" />
-        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Libraries.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.ChMod.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.CopyFile.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.GetEGid.cs" />
@@ -2288,6 +2300,7 @@
         <Compile Include="..\referencesource\mscorlib\system\security\cryptography\sha384managed.cs" />
         <Compile Include="..\referencesource\mscorlib\system\security\cryptography\sha512managed.cs" />
         <Compile Include="..\referencesource\mscorlib\system\security\cryptography\tripledescryptoserviceprovider.cs" />
+        <Compile Include="..\referencesource\mscorlib\system\timezoneinfo.cs" />
         <Compile Include="Microsoft.Win32\IRegistryApi.cs" />
         <Compile Include="Microsoft.Win32\Registry.cs" />
         <Compile Include="Microsoft.Win32\RegistryKey.cs" />
@@ -2302,7 +2315,13 @@
         <Compile Include="System.Security.Cryptography\MD5CryptoServiceProvider.cs" />
         <Compile Include="System.Security.Cryptography\RNGCryptoServiceProvider.cs" />
         <Compile Include="System.Security.Cryptography\SHA1CryptoServiceProvider.cs" />
+        <Compile Include="System\TimeZoneInfo.Android.cs" />
+        <Compile Include="System\TimeZoneInfo.MonoTouch.cs" />
+        <Compile Include="System\TimeZoneInfo.Serialization.cs" />
+        <Compile Include="System\TimeZoneInfo.WinRT.cs" />
+        <Compile Include="System\TimeZoneInfo.cs" />
         <Compile Include="corefx\Mono.SafePasswordHandle.Unix.cs" />
+        <Compile Include="corefx\TimeZoneInfo.cs" />
         <Compile Include="corert\PreAllocatedOverlapped.platformnotsupported.cs" />
         <Compile Include="corert\ThreadPoolBoundHandle.platformnotsupported.cs" />
       </ItemGroup>
@@ -2311,11 +2330,11 @@
       <ItemGroup>
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.Errors.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.IOErrors.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.Libraries.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.GetRandomBytes.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.ReadDir.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.Stat.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\IO\PathInternal.Unix.cs" />
-        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Libraries.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.ChMod.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.CopyFile.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.GetEGid.cs" />
@@ -2351,6 +2370,7 @@
         <Compile Include="..\referencesource\mscorlib\system\security\cryptography\sha384managed.cs" />
         <Compile Include="..\referencesource\mscorlib\system\security\cryptography\sha512managed.cs" />
         <Compile Include="..\referencesource\mscorlib\system\security\cryptography\tripledescryptoserviceprovider.cs" />
+        <Compile Include="..\referencesource\mscorlib\system\timezoneinfo.cs" />
         <Compile Include="Microsoft.Win32\IRegistryApi.cs" />
         <Compile Include="Microsoft.Win32\Registry.cs" />
         <Compile Include="Microsoft.Win32\RegistryKey.cs" />
@@ -2365,7 +2385,13 @@
         <Compile Include="System.Security.Cryptography\MD5CryptoServiceProvider.cs" />
         <Compile Include="System.Security.Cryptography\RNGCryptoServiceProvider.cs" />
         <Compile Include="System.Security.Cryptography\SHA1CryptoServiceProvider.cs" />
+        <Compile Include="System\TimeZoneInfo.Android.cs" />
+        <Compile Include="System\TimeZoneInfo.MonoTouch.cs" />
+        <Compile Include="System\TimeZoneInfo.Serialization.cs" />
+        <Compile Include="System\TimeZoneInfo.WinRT.cs" />
+        <Compile Include="System\TimeZoneInfo.cs" />
         <Compile Include="corefx\Mono.SafePasswordHandle.Unix.cs" />
+        <Compile Include="corefx\TimeZoneInfo.cs" />
         <Compile Include="corert\PreAllocatedOverlapped.platformnotsupported.cs" />
         <Compile Include="corert\ThreadPoolBoundHandle.platformnotsupported.cs" />
       </ItemGroup>
@@ -2374,11 +2400,11 @@
       <ItemGroup>
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.Errors.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.IOErrors.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.Libraries.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.GetRandomBytes.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.ReadDir.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.Stat.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\IO\PathInternal.Unix.cs" />
-        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Libraries.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.ChMod.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.CopyFile.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.GetEGid.cs" />
@@ -2414,6 +2440,7 @@
         <Compile Include="..\referencesource\mscorlib\system\security\cryptography\sha384managed.cs" />
         <Compile Include="..\referencesource\mscorlib\system\security\cryptography\sha512managed.cs" />
         <Compile Include="..\referencesource\mscorlib\system\security\cryptography\tripledescryptoserviceprovider.cs" />
+        <Compile Include="..\referencesource\mscorlib\system\timezoneinfo.cs" />
         <Compile Include="Microsoft.Win32\IRegistryApi.cs" />
         <Compile Include="Microsoft.Win32\Registry.cs" />
         <Compile Include="Microsoft.Win32\RegistryKey.cs" />
@@ -2428,7 +2455,13 @@
         <Compile Include="System.Security.Cryptography\MD5CryptoServiceProvider.cs" />
         <Compile Include="System.Security.Cryptography\RNGCryptoServiceProvider.cs" />
         <Compile Include="System.Security.Cryptography\SHA1CryptoServiceProvider.cs" />
+        <Compile Include="System\TimeZoneInfo.Android.cs" />
+        <Compile Include="System\TimeZoneInfo.MonoTouch.cs" />
+        <Compile Include="System\TimeZoneInfo.Serialization.cs" />
+        <Compile Include="System\TimeZoneInfo.WinRT.cs" />
+        <Compile Include="System\TimeZoneInfo.cs" />
         <Compile Include="corefx\Mono.SafePasswordHandle.Unix.cs" />
+        <Compile Include="corefx\TimeZoneInfo.cs" />
         <Compile Include="corert\PreAllocatedOverlapped.platformnotsupported.cs" />
         <Compile Include="corert\ThreadPoolBoundHandle.platformnotsupported.cs" />
       </ItemGroup>
@@ -2441,9 +2474,20 @@
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Windows\BCrypt\Interop.BCryptGenRandom.GetRandomBytes.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Windows\BCrypt\Interop.BCryptGenRandom.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Windows\BCrypt\Interop.NTSTATUS.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Windows\Kernel32\Interop.FreeLibrary.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Windows\Kernel32\Interop.LoadLibraryEx.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Windows\Kernel32\Interop.MAX_PATH.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Windows\Kernel32\Interop.MUI.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Windows\Kernel32\Interop.TimeZone.Registry.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Windows\Kernel32\Interop.TimeZone.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Windows\User32\Interop.LoadString.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\IO\PathInternal.Windows.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\IO\Win32Marshal.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.AdjustmentRule.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.StringSerializer.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.TransitionTime.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.Win32.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Windows\Interop.BOOL.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Windows\Interop.BOOLEAN.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Windows\Interop.Errors.cs" />
@@ -2500,6 +2544,7 @@
             <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Windows\kernel32\Interop.SetThreadErrorMode.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Windows\kernel32\Interop.WIN32_FILE_ATTRIBUTE_DATA.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Windows\kernel32\Interop.WIN32_FIND_DATA.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\Microsoft\Win32\SafeHandles\SafeLibraryHandle.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\System\IO\DriveInfoInternal.Win32.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\System\Memory\FixedBufferExtensions.cs" />
             <Compile Include="..\..\..\external\corefx\src\Microsoft.Win32.Registry\src\Microsoft\Win32\Registry.cs" />
@@ -2552,11 +2597,20 @@
           <ItemGroup>
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.Errors.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.IOErrors.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.Libraries.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Globalization.Native\Interop.ResultCode.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Globalization.Native\Interop.TimeZoneInfo.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Globalization.Native\Interop.Utils.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.GetRandomBytes.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.ReadDir.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.ReadLink.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.Stat.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\IO\PathInternal.Unix.cs" />
-            <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Libraries.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.AdjustmentRule.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.StringSerializer.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.TransitionTime.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.Unix.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.ChMod.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.CopyFile.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.GetEGid.cs" />
@@ -2615,11 +2669,20 @@
           <ItemGroup>
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.Errors.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.IOErrors.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.Libraries.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Globalization.Native\Interop.ResultCode.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Globalization.Native\Interop.TimeZoneInfo.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Globalization.Native\Interop.Utils.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.GetRandomBytes.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.ReadDir.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.ReadLink.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.Stat.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\IO\PathInternal.Unix.cs" />
-            <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Libraries.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.AdjustmentRule.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.StringSerializer.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.TransitionTime.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.Unix.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.ChMod.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.CopyFile.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.GetEGid.cs" />
@@ -2678,11 +2741,20 @@
           <ItemGroup>
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.Errors.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.IOErrors.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.Libraries.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Globalization.Native\Interop.ResultCode.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Globalization.Native\Interop.TimeZoneInfo.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Globalization.Native\Interop.Utils.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.GetRandomBytes.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.ReadDir.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.ReadLink.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.Stat.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\IO\PathInternal.Unix.cs" />
-            <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Libraries.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.AdjustmentRule.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.StringSerializer.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.TransitionTime.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.Unix.cs" />
+            <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\TimeZoneInfo.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.ChMod.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.CopyFile.cs" />
             <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.GetEGid.cs" />
@@ -2744,11 +2816,11 @@
       <ItemGroup>
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.Errors.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.IOErrors.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.Libraries.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.GetRandomBytes.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.ReadDir.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.Stat.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\IO\PathInternal.Unix.cs" />
-        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Libraries.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.ChMod.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.CopyFile.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.GetEGid.cs" />
@@ -2773,6 +2845,7 @@
         <Compile Include="..\..\..\external\corert\src\Common\src\Interop\Unix\System.Private.CoreLib.Native\Interop.Number.cs" />
         <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Number.Unix.cs" />
         <Compile Include="..\referencesource\mscorlib\microsoft\win32\safehandles\saferegistryhandle.cs" />
+        <Compile Include="..\referencesource\mscorlib\system\timezoneinfo.cs" />
         <Compile Include="CommonCrypto\CommonCrypto.cs" />
         <Compile Include="CommonCrypto\CorlibExtras.cs" />
         <Compile Include="CommonCrypto\CryptorTransform.cs" />
@@ -2795,7 +2868,13 @@
         <Compile Include="System\Environment.iOS.cs" />
         <Compile Include="System\Guid.MonoTouch.cs" />
         <Compile Include="System\NotSupportedException.iOS.cs" />
+        <Compile Include="System\TimeZoneInfo.Android.cs" />
+        <Compile Include="System\TimeZoneInfo.MonoTouch.cs" />
+        <Compile Include="System\TimeZoneInfo.Serialization.cs" />
+        <Compile Include="System\TimeZoneInfo.WinRT.cs" />
+        <Compile Include="System\TimeZoneInfo.cs" />
         <Compile Include="corefx\Mono.SafePasswordHandle.Unix.cs" />
+        <Compile Include="corefx\TimeZoneInfo.cs" />
         <Compile Include="corert\PreAllocatedOverlapped.platformnotsupported.cs" />
         <Compile Include="corert\ThreadPoolBoundHandle.platformnotsupported.cs" />
       </ItemGroup>
@@ -2804,11 +2883,11 @@
       <ItemGroup>
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.Errors.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.IOErrors.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.Libraries.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.GetRandomBytes.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.ReadDir.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.Stat.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\IO\PathInternal.Unix.cs" />
-        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Libraries.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.ChMod.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.CopyFile.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.GetEGid.cs" />
@@ -2833,6 +2912,7 @@
         <Compile Include="..\..\..\external\corert\src\Common\src\Interop\Unix\System.Private.CoreLib.Native\Interop.Number.cs" />
         <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Number.Unix.cs" />
         <Compile Include="..\referencesource\mscorlib\microsoft\win32\safehandles\saferegistryhandle.cs" />
+        <Compile Include="..\referencesource\mscorlib\system\timezoneinfo.cs" />
         <Compile Include="CommonCrypto\CommonCrypto.cs" />
         <Compile Include="CommonCrypto\CorlibExtras.cs" />
         <Compile Include="CommonCrypto\CryptorTransform.cs" />
@@ -2855,7 +2935,13 @@
         <Compile Include="System\Environment.iOS.cs" />
         <Compile Include="System\Guid.MonoTouch.cs" />
         <Compile Include="System\NotSupportedException.iOS.cs" />
+        <Compile Include="System\TimeZoneInfo.Android.cs" />
+        <Compile Include="System\TimeZoneInfo.MonoTouch.cs" />
+        <Compile Include="System\TimeZoneInfo.Serialization.cs" />
+        <Compile Include="System\TimeZoneInfo.WinRT.cs" />
+        <Compile Include="System\TimeZoneInfo.cs" />
         <Compile Include="corefx\Mono.SafePasswordHandle.Unix.cs" />
+        <Compile Include="corefx\TimeZoneInfo.cs" />
         <Compile Include="corert\PreAllocatedOverlapped.platformnotsupported.cs" />
         <Compile Include="corert\ThreadPoolBoundHandle.platformnotsupported.cs" />
       </ItemGroup>
@@ -2864,11 +2950,11 @@
       <ItemGroup>
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.Errors.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.IOErrors.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.Libraries.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.GetRandomBytes.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.ReadDir.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.Stat.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\IO\PathInternal.Unix.cs" />
-        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Libraries.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.ChMod.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.CopyFile.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.GetEGid.cs" />
@@ -2893,6 +2979,7 @@
         <Compile Include="..\..\..\external\corert\src\Common\src\Interop\Unix\System.Private.CoreLib.Native\Interop.Number.cs" />
         <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Number.Unix.cs" />
         <Compile Include="..\referencesource\mscorlib\microsoft\win32\safehandles\saferegistryhandle.cs" />
+        <Compile Include="..\referencesource\mscorlib\system\timezoneinfo.cs" />
         <Compile Include="CommonCrypto\CommonCrypto.cs" />
         <Compile Include="CommonCrypto\CorlibExtras.cs" />
         <Compile Include="CommonCrypto\CryptorTransform.cs" />
@@ -2915,7 +3002,13 @@
         <Compile Include="System\Environment.iOS.cs" />
         <Compile Include="System\Guid.MonoTouch.cs" />
         <Compile Include="System\NotSupportedException.iOS.cs" />
+        <Compile Include="System\TimeZoneInfo.Android.cs" />
+        <Compile Include="System\TimeZoneInfo.MonoTouch.cs" />
+        <Compile Include="System\TimeZoneInfo.Serialization.cs" />
+        <Compile Include="System\TimeZoneInfo.WinRT.cs" />
+        <Compile Include="System\TimeZoneInfo.cs" />
         <Compile Include="corefx\Mono.SafePasswordHandle.Unix.cs" />
+        <Compile Include="corefx\TimeZoneInfo.cs" />
         <Compile Include="corert\PreAllocatedOverlapped.platformnotsupported.cs" />
         <Compile Include="corert\ThreadPoolBoundHandle.platformnotsupported.cs" />
       </ItemGroup>
@@ -2924,11 +3017,11 @@
       <ItemGroup>
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.Errors.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.IOErrors.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\Interop.Libraries.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.GetRandomBytes.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.ReadDir.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\Interop\Unix\System.Native\Interop.Stat.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\IO\PathInternal.Unix.cs" />
-        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Libraries.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.ChMod.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.CopyFile.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.GetEGid.cs" />
@@ -2964,6 +3057,7 @@
         <Compile Include="..\referencesource\mscorlib\system\security\cryptography\sha384managed.cs" />
         <Compile Include="..\referencesource\mscorlib\system\security\cryptography\sha512managed.cs" />
         <Compile Include="..\referencesource\mscorlib\system\security\cryptography\tripledescryptoserviceprovider.cs" />
+        <Compile Include="..\referencesource\mscorlib\system\timezoneinfo.cs" />
         <Compile Include="Microsoft.Win32\IRegistryApi.cs" />
         <Compile Include="Microsoft.Win32\Registry.cs" />
         <Compile Include="Microsoft.Win32\RegistryKey.cs" />
@@ -2978,7 +3072,13 @@
         <Compile Include="System.Security.Cryptography\MD5CryptoServiceProvider.cs" />
         <Compile Include="System.Security.Cryptography\RNGCryptoServiceProvider.cs" />
         <Compile Include="System.Security.Cryptography\SHA1CryptoServiceProvider.cs" />
+        <Compile Include="System\TimeZoneInfo.Android.cs" />
+        <Compile Include="System\TimeZoneInfo.MonoTouch.cs" />
+        <Compile Include="System\TimeZoneInfo.Serialization.cs" />
+        <Compile Include="System\TimeZoneInfo.WinRT.cs" />
+        <Compile Include="System\TimeZoneInfo.cs" />
         <Compile Include="corefx\Mono.SafePasswordHandle.Unix.cs" />
+        <Compile Include="corefx\TimeZoneInfo.cs" />
         <Compile Include="corert\PreAllocatedOverlapped.platformnotsupported.cs" />
         <Compile Include="corert\ThreadPoolBoundHandle.platformnotsupported.cs" />
       </ItemGroup>

+ 1 - 0
mcs/class/corlib/corlib_xtest.dll.sources

@@ -249,6 +249,7 @@
 ../../../external/corefx/src/System.Runtime/tests/System/DateTimeTests.cs
 ../../../external/corefx/src/System.Runtime/tests/System/DateTimeTests.netcoreapp.cs
 ../../../external/corefx/src/System.Runtime/tests/System/TimeZoneTests.cs
+../../../external/corefx/src/System.Runtime/tests/System/TimeZoneNotFoundExceptionTests.cs
 ../../../external/corefx/src/System.Runtime/tests/System/TimeSpanTests.cs
 ../../../external/corefx/src/System.Runtime/tests/System/TimeSpanTests.netcoreapp.cs
 ../../../external/corefx/src/System.Runtime/tests/System/ArraySegmentTests.cs

+ 1 - 1
mcs/class/corlib/unix_build_corlib.dll.sources

@@ -7,7 +7,7 @@
 ../../../external/corefx/src/Common/src/CoreLib/System/IO/PathInternal.Unix.cs
 ../../../external/corefx/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Stat.cs
 ../../../external/corefx/src/Common/src/Interop/Unix/System.Native/Interop.Stat.Span.cs
-../../../external/corefx/src/Common/src/Interop/Unix/Interop.Libraries.cs
+../../../external/corefx/src/Common/src/CoreLib/Interop/Unix/Interop.Libraries.cs
 ../../../external/corefx/src/Common/src/CoreLib/Interop/Unix/Interop.Errors.cs
 ../../../external/corefx/src/Common/src/CoreLib/Interop/Unix/Interop.IOErrors.cs
 ../../../external/corefx/src/Common/src/Interop/Unix/System.Native/Interop.Permissions.cs

+ 9 - 0
mcs/class/corlib/unix_net_4_x_corlib.dll.exclude.sources

@@ -1 +1,10 @@
 #include unix_build_corlib.dll.exclude.sources
+
+../referencesource/mscorlib/system/timezoneinfo.cs
+corefx/TimeZoneInfo.cs
+System/TimeZoneInfo.cs
+System/TimeZoneInfo.Android.cs
+System/TimeZoneInfo.MonoTouch.cs
+System/TimeZoneInfo.Serialization.cs
+System/TimeZoneInfo.WinRT.cs
+

+ 11 - 0
mcs/class/corlib/unix_net_4_x_corlib.dll.sources

@@ -2,3 +2,14 @@
 #include unix_build_corlib.dll.sources
 
 ../../../external/corefx/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetRandomBytes.cs
+
+corefx/TimeZoneInfo.cs
+../../../external/corefx/src/Common/src/CoreLib/System/TimeZoneInfo.AdjustmentRule.cs
+../../../external/corefx/src/Common/src/CoreLib/System/TimeZoneInfo.StringSerializer.cs
+../../../external/corefx/src/Common/src/CoreLib/System/TimeZoneInfo.TransitionTime.cs
+../../../external/corefx/src/Common/src/CoreLib/System/TimeZoneInfo.cs
+../../../external/corefx/src/Common/src/CoreLib/System/TimeZoneInfo.Unix.cs
+../../../external/corefx/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.ResultCode.cs
+../../../external/corefx/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.TimeZoneInfo.cs
+../../../external/corefx/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Utils.cs
+../../../external/corefx/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ReadLink.cs

+ 8 - 0
mcs/class/corlib/win32_net_4_x_corlib.dll.exclude.sources

@@ -19,3 +19,11 @@ System.Security.AccessControl/RegistryAccessRule.cs
 System.Security.AccessControl/RegistryAuditRule.cs
 System.Security.AccessControl/RegistrySecurity.cs
 ../referencesource/mscorlib/microsoft/win32/safehandles/saferegistryhandle.cs
+
+../referencesource/mscorlib/system/timezoneinfo.cs
+corefx/TimeZoneInfo.cs
+System/TimeZoneInfo.cs
+System/TimeZoneInfo.Android.cs
+System/TimeZoneInfo.MonoTouch.cs
+System/TimeZoneInfo.Serialization.cs
+System/TimeZoneInfo.WinRT.cs

+ 14 - 0
mcs/class/corlib/win32_net_4_x_corlib.dll.sources

@@ -22,6 +22,20 @@
 ../../../external/corert/src/System.Private.CoreLib/src/System/Threading/Win32ThreadPoolNativeOverlapped.OverlappedData.cs
 ../../../external/corert/src/System.Private.CoreLib/src/System/Threading/Win32ThreadPoolPreAllocatedOverlapped.cs
 
+../../../external/corefx/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TimeZone.cs
+../../../external/corefx/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FreeLibrary.cs
+../../../external/corefx/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TimeZone.Registry.cs
+../../../external/corefx/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MUI.cs
+../../../external/corefx/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LoadLibraryEx.cs
+../../../external/corefx/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MAX_PATH.cs
+../../../external/corefx/src/Common/src/CoreLib/Interop/Windows/User32/Interop.LoadString.cs
+../../../external/corefx/src/Common/src/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs
+../../../external/corefx/src/Common/src/CoreLib/System/TimeZoneInfo.AdjustmentRule.cs
+../../../external/corefx/src/Common/src/CoreLib/System/TimeZoneInfo.StringSerializer.cs
+../../../external/corefx/src/Common/src/CoreLib/System/TimeZoneInfo.TransitionTime.cs
+../../../external/corefx/src/Common/src/CoreLib/System/TimeZoneInfo.Win32.cs
+../../../external/corefx/src/Common/src/CoreLib/System/TimeZoneInfo.cs
+
 corert/RuntimeImports.cs
 ../../../external/corert/src/System.Private.CoreLib/src/System/Number.Windows.cs
 ../../../external/corert/src/Runtime.Base/src/System/Runtime/InteropServices/NativeCallableAttribute.cs

+ 8 - 0
mcs/class/corlib/winaot_corlib.dll.exclude.sources

@@ -18,3 +18,11 @@ System.Security.AccessControl/RegistryAccessRule.cs
 System.Security.AccessControl/RegistryAuditRule.cs
 System.Security.AccessControl/RegistrySecurity.cs
 ../referencesource/mscorlib/microsoft/win32/safehandles/saferegistryhandle.cs
+
+../referencesource/mscorlib/system/timezoneinfo.cs
+corefx/TimeZoneInfo.cs
+System/TimeZoneInfo.cs
+System/TimeZoneInfo.Android.cs
+System/TimeZoneInfo.MonoTouch.cs
+System/TimeZoneInfo.Serialization.cs
+System/TimeZoneInfo.WinRT.cs

+ 1 - 0
mcs/class/test-helpers/PlatformDetection.cs

@@ -22,6 +22,7 @@ namespace System
 		public static bool IsOpenSUSE => false;
 		public static bool IsUbuntu1404 => false;
 		public static bool IsNotRedHatFamily6 => true;
+		public static bool IsMacOsHighSierraOrHigher => false;
 		public static bool IsInvokingStaticConstructorsSupported => true;
 		public static bool IsReflectionEmitSupported => true;
 

+ 1 - 1
mono/mini/Makefile.am.in

@@ -934,7 +934,7 @@ fullaotcheck: $(mono) $(fullaot_regtests) $(fullaot_testing_deps)
 	MONO_PATH=$(FULLAOT_TMP_DIR) $(top_builddir)/runtime/mono-wrapper $(MOBILE_RUNTIME_ARG) $(LLVM_AOT_RUNTIME_OPTS) $(GSHAREDVT_RUNTIME_OPTS) --aot="$(FULLAOT_AOT_ARGS),$(MONO_FULLAOT_ADDITIONAL_ARGS)$(INVARIANT_AOT_OPTIONS)" $(FULLAOT_TMP_DIR)/{$(fullaot_testing_deps_commas),*.exe} || exit 1
 	ln -s $(if $(MONO_EXECUTABLE),$(MONO_EXECUTABLE),$$PWD/mono) $(FULLAOT_TMP_DIR)/
 	for i in $(fullaot_regtests); do echo $$i; MONO_PATH=$(FULLAOT_TMP_DIR) $(top_builddir)/runtime/mono-wrapper $(MOBILE_RUNTIME_ARG) $(FULLAOT_ARGS) $(FULLAOT_TMP_DIR)/$$i --exclude '!FULLAOT' $(ARCH_FULLAOT_EXCLUDE) || exit 1; done
-	if test x$(MIXED) == x1; then failed=0;i=0; while test $$i -lt 900; do i=`expr $$i + 1`; bash -c "echo -n '.'"; MONO_PATH=$(FULLAOT_TMP_DIR) MONO_DEBUG=aot-skip=$$i ./mono --full-aot-interp $(FULLAOT_TMP_DIR)/basic.exe > $(FULLAOT_TMP_DIR)/mixed.log || failed=1; if test $$failed -eq 1; then echo "Failed at $$i"; exit $$failed; fi; done; fi
+	if test x$(MIXED) == x1; then failed=0;i=0; while test $$i -lt 900; do i=`expr $$i + 1`; bash -c "echo -n '.'"; MONO_PATH=$(FULLAOT_TMP_DIR) MONO_DEBUG=aot-skip=$$i $(top_builddir)/runtime/mono-wrapper --full-aot-interp $(FULLAOT_TMP_DIR)/basic.exe > $(FULLAOT_TMP_DIR)/mixed.log || failed=1; if test $$failed -eq 1; then echo "Failed at $$i"; exit $$failed; fi; done; fi
 
 # This can run in parallel
 fullaot-libs: $(patsubst %,fullaot-tmp/%.dylib,$(FULLAOT_LIBS))