- 28 12月, 2020 6 次提交
-
-
由 Scott Ferguson 提交于
Corrects an issue where for the hour after the DST transition, the local UTC offset was listed. The UTC offset was the DST offset instead of the standard time offset. The runtime library captures this an ambiguous time. That is the local time that occurs twice - once in DST then once in standard time. If DST is an extra 1:00 a.m. offset and ends at 2:00 a.m., 1:00 a.m. to 1:59:59.9999.... occurs twice. First in DST then again in standard time. The classlibs had this incorrect - they did not consider 1:00 a.m. an ambiguous time, and considered 2:00 a.m. ambiguous. However it should be reversed. 1:00 a.m. occurs twice, but 2:00 a.m. only occurs once. The instance we would hit 2:00 a.m. DST, we instantaneous switch to 1:00 a.m. standard. The classlibs were also not recording enough information to record which side of DST a local time was. When converting a time from UTC, or using DateTime.Now an internal flag, IsAmbiguousDaylightSavingTime, should be set if the time is an ambiguous local time that is on the DST side of the transition. The classlibs were calling TimeZone.IsAmbigousTime which has a wider defintion for ambiguous time that the IsAmbiguousDaylightSavingTime should have. It returns true for local times on either side of DST. So a new method IsAmbiguousLocalDstFromUtc was added to check this case. The classlibs were also not checking the IsAmbiguousLocalDstFromUtc flag when getting the UTC offset for a local time. So a check was inserted in two locations to correct for that. Some tests has to be updated to reflect these new definitions of when DST starts and ends and which times are ambiguous. These also account for some test changes required by cherry-picked changes to TimeZoneInfo.cs where the corresponding test changes were not cherry-picked. Some of those changes where in PR's that updated to the CoreFx TimeZoneInfo class. All these changes have been verified against the behavior of the .Net Framework and they match. Fix case 1288231: Mono: Fix incorrect UTC offset during daylight savings time transitions
-
由 Maxim Lipnin 提交于
Addresses an issue with jumping into DST for some time zones when the incorrect date-time offset is returned for date-time in UTC (which comes from DateTime.Now). The fix is to just check if the incoming date-time is in UTC. Also added a set of tests for some time zones to verify jumping into DST in general. Fixes https://github.com/mono/mono/issues/16395
-
-
由 Maxim Lipnin 提交于
-
由 Maxim Lipnin 提交于
When a datetime appears in range of [end_of_DST_period - Daylight_delta; end_of_DST_period] it's not DST and should return base offset. Fixes #9664.
-
由 Maxim Lipnin 提交于
-
- 27 8月, 2020 2 次提交
-
-
由 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.
-
由 UnityAlex 提交于
Fixing a hang that would occur when there is incorrectly set time zone data in the windows registry. (case 1256569)
-
- 25 9月, 2019 1 次提交
-
-
由 UnityAlex 提交于
TimeZoneNotFoundException. Added a catch to allow mono to try the WinRT fallback which appears to work even when there is an invalid timezone value in the registry.
-
- 15 1月, 2019 1 次提交
-
-
由 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.
-
- 10 1月, 2019 1 次提交
-
-
由 Jonathan Chambers 提交于
Attempt to use Win32 APIs first to retreive current timezone. Registry value can be null/corrupt (case 1076679)
-
- 16 1月, 2018 1 次提交
-
-
由 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...
-
- 21 12月, 2017 1 次提交
-
-
由 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.
-
- 12 10月, 2017 2 次提交
-
-
由 Vincent Povirk 提交于
This was hiding a bug reading registry info for some timezones.
-
由 Vincent Povirk 提交于
This fixes creation of TimeZoneInfo for some time zones on Wine (such as Israel Standard Time) and probably also Windows.
-
- 21 9月, 2017 1 次提交
-
-
由 Egor Bogatov 提交于
-
- 25 5月, 2017 1 次提交
-
-
由 Marcin Cieślak 提交于
* Bug #56499: unreadable /etc/localtime should not cause an exception * Fix build
-
- 05 5月, 2017 1 次提交
-
-
由 Andi McClure 提交于
This was breaking the hybrid AOT build.
-
- 18 4月, 2017 1 次提交
-
-
由 Marek Safar 提交于
* [corlib] Fixes static builds
-
- 14 2月, 2017 1 次提交
-
-
由 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.
-
- 07 2月, 2017 1 次提交
-
-
由 Niklas Therning 提交于
Band aid fix until we can switch to CoreRT's implementation.
-
- 25 1月, 2017 1 次提交
-
-
由 Henric Müller 提交于
-
- 21 12月, 2016 1 次提交
-
-
由 Alexander Köplinger 提交于
-
- 25 11月, 2016 1 次提交
-
-
由 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.
-
- 22 11月, 2016 1 次提交
-
-
由 Ludovic Henry 提交于
This only fixes the compilation of the assemblies and the tests. This doesn't fix the failing tests or the crashes.
-
- 15 9月, 2016 2 次提交
-
-
由 Marek Safar 提交于
-
由 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.
-
- 14 9月, 2016 1 次提交
-
-
由 Niklas Therning 提交于
behaviour when passed times within the lost period at DST start When passed a time within this period .NET's IsDaylightSavingTime() returns true while GetUtcOffset() returns the BaseUtcOffset without the DST delta added. This patch changes the behaviour in Mono to do what .NET does.
-
- 20 8月, 2016 1 次提交
-
-
由 Marek Safar 提交于
-
- 18 8月, 2016 1 次提交
-
-
由 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.
-
- 14 7月, 2016 1 次提交
-
-
由 Marcos Henrich 提交于
Fixes #41349
-
- 21 6月, 2016 1 次提交
-
-
由 Marek Safar 提交于
-
- 11 6月, 2016 1 次提交
-
-
由 Marek Safar 提交于
[mscorlib] Better handling of unix timezones which have offset not specified in whole minutes. Fixes #41492
-
- 01 3月, 2016 1 次提交
-
-
由 Arturo Espinosa 提交于
Such as "Central Standard Time (Mexico)"
-
- 20 2月, 2016 1 次提交
-
-
由 kchernyavskiy 提交于
-
- 18 2月, 2016 1 次提交
-
-
由 Andi McClure 提交于
Previously this caught only cases where libc was absent, now it catches cases where libc is present but does not contain readlink
-
- 17 2月, 2016 1 次提交
-
-
由 Paul Gofman 提交于
-
- 10 2月, 2016 1 次提交
-
-
由 Marek Safar 提交于
-
- 13 11月, 2015 1 次提交
-
-
由 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
-
- 16 9月, 2015 1 次提交
-
-
由 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.
-