1. 15 12月, 2020 1 次提交
  2. 23 7月, 2020 1 次提交
    • U
      The fix for 1256569 broke a test. Reverting most of that change and breaking... · a54323f2
      UnityAlex 提交于
      The fix for 1256569 broke a test. Reverting most of that change and breaking the CreateLocal -> WinRTFallback -> CreateLocal loop by calling GetLocalTimeZoneInfoWinRTFallback instead of accessing Local from within FindSystemTimeZoneByIdWinRTFallback fixes both issues.
      
      Need to make sure we don't duplicate the timezone and create a new local when we already have one.
      a54323f2
  3. 01 7月, 2020 1 次提交
  4. 06 8月, 2019 1 次提交
  5. 15 1月, 2019 1 次提交
    • J
      Don't use exceptions for time zones (case 1100856) · 0219c20d
      Josh Peterson 提交于
      The current class library code uses managed exceptions for flow control
      for time zone handling. Specifically, it depends on exceptions to occur
      if one of the files that _might_ have time zone information does not
      exist.
      
      On Android with IL2CPP we run into problems with C++ exceptions causing
      hangs in some cases. Since IL2CPP implements managed exceptions using
      C++ exceptions, this code can cause problems.
      
      This change corrects Unity case 1100856.
      0219c20d
  6. 10 1月, 2019 1 次提交
  7. 16 1月, 2018 1 次提交
    • M
      for some regions, specifically Asia/Singapore, the native icall returns... · 9500a301
      Michael DeRoy 提交于
      for some regions, specifically Asia/Singapore, the native icall returns incorrectly because the country's timezone changed. In this case in 1981 Asia/Singapore changed from +0730 to +08....Since the UTC offset changed, our logic thinks that daylight savings may have started, and the icall returns incorrect data, which causes the CreateLocalUnity function to throw.  Fixing the icall is important, but for the time being we'll wrap the CreateLocalUnity function with a try catch. then fix the native icall...
      9500a301
  8. 21 12月, 2017 1 次提交
    • J
      Fix TimeZoneInfo local time on platforms that do not have tzdata · 5778842d
      Jonathan Chambers 提交于
      CreateLocal works by checking the platform. If it is windows, it uses the windows API or registry depending on api version, UWP, etc. otherwise it checks for the $TZ environment variable. If thats not found. it looks for /etc/localtime.....more obscure platforms like WebGL have no means of obtaining tzdata this way. This means that CreateLocal falls back to setting the TimeZoneInfo.Local time to UTC....this causes functions like DateTime.Now and DateTime.ToLocalTime to convert to UTC, instead of the user's local time.  By using Mono's old icall, we won't be able to convert between arbitrary timezones, but basic time conversion, such as UTC to Local will work.
      5778842d
  9. 12 10月, 2017 2 次提交
  10. 21 9月, 2017 1 次提交
  11. 25 5月, 2017 1 次提交
  12. 05 5月, 2017 1 次提交
  13. 18 4月, 2017 1 次提交
  14. 14 2月, 2017 1 次提交
    • N
      Fix DateTime.Now and CurrentTimeToUtc during DST transition time (#4172) · 16edc1e5
      Neale Ferguson 提交于
      * During the ambiguous hour .NET will return the DST version of the time whereas mono is returning the base time. Rather than use the transitions array we look up the Adjustment rules (which are created from the transition rules in the first place).
      
      In addition, CurrentTimeToUtc() also has problems around the transition time.
      
      Added test and fixed another.
      
      Fixes #43805.
      
      * Despite the tutorial on msdn about daylight saving time, .NET interprets the 'ambiguous' hour of DST as being DST rather than standard time which is what mono did.
      16edc1e5
  15. 07 2月, 2017 1 次提交
  16. 25 1月, 2017 1 次提交
  17. 21 12月, 2016 1 次提交
  18. 25 11月, 2016 1 次提交
    • A
      Rename the mobile_static profile to aot_only · 9f5b8c4c
      Alexander Köplinger 提交于
      We decided it's a better name since we're using the profile to
      test FullAOT scenarios on desktop (as opposed to the mobile profiles).
      
      While doing the rename I saw that a lot of the #ifdefs were using
      MOBILE_STATIC even though the code should actually be included/excluded
      in all FullAOT scenarios, e.g. System.Reflection.Emit. I replaced those
      cases with FULL_AOT_RUNTIME instead.
      
      For cases where code is specific to this profile, I added a new
      AOT_ONLY_DESKTOP define.
      9f5b8c4c
  19. 22 11月, 2016 1 次提交
  20. 15 9月, 2016 2 次提交
    • M
      [bcl] Fix few warnings · 39d34f4c
      Marek Safar 提交于
      39d34f4c
    • N
      Fixes time zone issues when running on Windows · c6e0d5d7
      Niklas Therning 提交于
      TimeZoneInfo.GetDaylightChanges() didn't work as expected when run against the
      time zone data available in Windows.
      
      This patch also enables most of the time zone related tests that were
      previously ignored when not run on Unix platforms. Time zone ids will now be
      mapped from tz db time zone names to Windows time zone names when needed so
      that most of the tests can be run on Mono on Windows as well.
      c6e0d5d7
  21. 14 9月, 2016 1 次提交
  22. 20 8月, 2016 1 次提交
  23. 18 8月, 2016 1 次提交
    • L
      [mcs] Replace NET_2_1 by MOBILE · 249daf43
      Ludovic Henry 提交于
      NET_2_1 is also defined whenever we define MOBILE, so they have the same effect. Silverlight was 2.1 but it's been dead for a while now, and we do not even support it.
      249daf43
  24. 14 7月, 2016 1 次提交
  25. 21 6月, 2016 1 次提交
  26. 11 6月, 2016 1 次提交
  27. 01 3月, 2016 1 次提交
  28. 20 2月, 2016 1 次提交
  29. 18 2月, 2016 1 次提交
  30. 17 2月, 2016 1 次提交
  31. 10 2月, 2016 1 次提交
  32. 13 11月, 2015 1 次提交
    • M
      [corlib] Fixes TimeZoneInfo.ParseTZBuffer abbrevs. · 54d3309f
      Marcos Henrich 提交于
      Context: https://bugzilla.xamarin.com/show_bug.cgi?id=31432
      
      In a few android devices TimeZoneInfo.ParseTZBuffer was failing ito
      parse Europe/Moscow with:
      at System.ThrowHelper.ThrowKeyNotFoundException ()
      at System.Collections.Generic.Dictionary`2[System.Int32,System.String].get_Item (Int32 key)mscorlib/system/collections/generic/dictionary.cs:176
      at System.TimeZoneInfo.ParseTimesTypes (System.Byte[] buffer, Int32 index, Int32 count, System.Collections.Generic.Dictionary`2 abbreviations) [0x0002f] in mcs/class/corlib/System/TimeZoneInfo.cs:1293
      at System.TimeZoneInfo.ParseTZBuffer (System.String id, System.Byte[] buffer, Int32 length)
      
      It was failing while getting the third index [3] from] from abbrevs.
      
      abbrevs added values were the following:
      [0, MMT]
      [1, MT]
      [2, T]
      [4, MST]
      [5, ST]
      [6, T]
      [8, MDST]
      [9, DST]
      [10, ST]
      [11, T]
      [13, S]
      [15, M]
      [17, MSK]
      [18, SK]
      [19, K]
      [21, EET]
      [22, ET]
      [23, T]
      [25, MSD]
      [26, SD]
      [27, D]
      [29, EEST]
      [30, EST]
      [31, ST]
      [32, T]
      
      Index 3 was not added because its values is an empty string, as indexes
      with empty values are used in this case we are now adding them to the
      abbrevs dictionary.
      
      Fixes #31432
      54d3309f
  33. 16 9月, 2015 1 次提交
    • M
      [System] Fixes TimeZoneInfo.ConvertTimeFromUtc. · 6cccbbdb
      Marcos Henrich 提交于
      Fixes TimeZoneInfo.ConvertTimeFromUtc and related tests when
      TimeZoneInfo.Local is equal to TimeZoneInfo.Utc.
      
      In .NET if we set TimeZoneInfo.Local to TimeZoneInfo.Utc by using
      reflection.
      
      ```
      var cachedDataField = typeof (TimeZoneInfo).GetField ("s_cachedData",
      BindingFlags.Static | BindingFlags.GetField | BindingFlags.NonPublic);
      
      var localField = cachedDataField.FieldType.GetField ("m_localTimeZone",
      BindingFlags.Instance | BindingFlags.GetField | BindingFlags.NonPublic);
      
      var localFieldObj = cachedDataField.GetValue (null);
      
      localField.SetValue (localFieldObj, DateTimeKind.Utc);
      ```
      
      We can observe that `TimeZoneInfo.ConvertTimeFromUtc (DateTime.UtcNow,
      TimeZoneInfo.Local).Kind` is DateTimeKind.Utc.
      
      By looking at reference source [code](http://referencesource.microsoft.com/#mscorlib/system/timezoneinfo.cs,211)
      we can also confirm that while getting a time zone corresponding kind,
      Utc is prioritized over Local.
      
      This commit reverts changes introduced by
      60d5b39e that were prioritizing Local
      over Utc and changes tests to expect Utc kinds instead of Local when
      TimeZoneInfo.Local is equal to TimeZoneInfo.Utc.
      6cccbbdb
  34. 15 9月, 2015 1 次提交
  35. 11 9月, 2015 1 次提交
  36. 03 9月, 2015 1 次提交
  37. 20 8月, 2015 1 次提交
  38. 19 8月, 2015 1 次提交