Merge pull request #1949 from lewurm/fixtype
[mono.git] / mcs / class / corlib / System / TimeZoneInfo.Android.cs
index 830b0f8cf5eb3fadeaf0747f2d716d8c530ea94e..45475e910b5caebc26b28d8ce92b16e5b026b2ef 100644 (file)
@@ -253,6 +253,28 @@ namespace System {
 
        partial class TimeZoneInfo {
 
+               static TimeZoneInfo CreateLocal ()
+               {
+                       return AndroidTimeZones.Local;
+               }
+
+               static TimeZoneInfo FindSystemTimeZoneByIdCore (string id)
+               {
+                       var timeZoneInfo = AndroidTimeZones.GetTimeZone (id, id);
+                       if (timeZoneInfo == null)
+                               throw new TimeZoneNotFoundException ();
+                       return timeZoneInfo;
+               }
+
+               static void GetSystemTimeZonesCore (List<TimeZoneInfo> systemTimeZones)
+               {
+                       foreach (string id in AndroidTimeZones.GetAvailableIds ()) {
+                               var tz = AndroidTimeZones.GetTimeZone (id, id);
+                               if (tz != null)
+                                       systemTimeZones.Add (tz);
+                       }
+               }
+
                /*
                 * Android < v4.3 Timezone support infrastructure.
                 *