Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@MaximLipnin
Copy link
Contributor

@MaximLipnin MaximLipnin commented Aug 23, 2019

There is 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 I added set of tests for some time zones but they verify jumping into DST in general.
Fixes #16395

@MaximLipnin
Copy link
Contributor Author

@monojenkins build failed

@marek-safar
Copy link
Member

@steveisok what's the plan with this PR?

@steveisok
Copy link
Contributor

@MaximLipnin Asked me to test and then we'll move it forward.

@MaximLipnin MaximLipnin changed the title Test jumping into DST for some time zones Fix time zone issue when jumping into DST Sep 23, 2019
@MaximLipnin MaximLipnin marked this pull request as ready for review September 23, 2019 10:15
@steveisok
Copy link
Contributor

Ran local device tests with the sample in #16395. Works as expected.

@steveisok steveisok merged commit f91dcb9 into mono:master Sep 24, 2019
@steveisok
Copy link
Contributor

@monojenkins backport 2019-08

@monojenkins
Copy link
Contributor

@steveisok backporting to 2019-08 failed, the patch results in conflicts:

Applying: Test jumping into DST for some time zones
Applying: Update test output
Applying: Correct Asia/Jerusalem offsets
Applying: Correct offsets for Asia/Amman and Europe/Prague
Applying: Correct DST-2020 start time for Europe/Athens
Applying: Correct time zone mapping for Europe/Chisinau
Applying: FIx DateTime.Now in DST delta
Applying: Comma
Using index info to reconstruct a base tree...
M	mcs/class/corlib/Test/System/TimeZoneInfoTest.cs
Falling back to patching base and 3-way merge...
Auto-merging mcs/class/corlib/Test/System/TimeZoneInfoTest.cs
CONFLICT (content): Merge conflict in mcs/class/corlib/Test/System/TimeZoneInfoTest.cs
error: Failed to merge in the changes.
Patch failed at 0008 Comma

Please backport manually!

steveisok pushed a commit to steveisok/mono that referenced this pull request Sep 24, 2019
…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 I added set of tests for some time zones but they verify jumping into DST in general.

Fixes mono#16395

Backport of mono#16430
akoeplinger pushed a commit that referenced this pull request Sep 25, 2019
There is 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 I added set of tests for some time zones but they verify jumping into DST in general.

Fixes #16395

Backport of #16430
@steveisok
Copy link
Contributor

@monojenkins backport 2019-06

@monojenkins
Copy link
Contributor

@steveisok backporting to 2019-06 failed, the patch results in conflicts:

Applying: Test jumping into DST for some time zones
Applying: Update test output
Applying: Correct Asia/Jerusalem offsets
Applying: Correct offsets for Asia/Amman and Europe/Prague
Applying: Correct DST-2020 start time for Europe/Athens
Applying: Correct time zone mapping for Europe/Chisinau
Applying: FIx DateTime.Now in DST delta
Applying: Comma
Using index info to reconstruct a base tree...
M	mcs/class/corlib/Test/System/TimeZoneInfoTest.cs
Falling back to patching base and 3-way merge...
Auto-merging mcs/class/corlib/Test/System/TimeZoneInfoTest.cs
CONFLICT (content): Merge conflict in mcs/class/corlib/Test/System/TimeZoneInfoTest.cs
error: Failed to merge in the changes.
Patch failed at 0008 Comma

Please backport manually!

steveisok pushed a commit to steveisok/mono that referenced this pull request Sep 25, 2019
…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 I added set of tests for some time zones but they verify jumping into DST in general.

Fixes mono#16395

Backport of mono#16430
akoeplinger pushed a commit that referenced this pull request Sep 26, 2019
There is 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 I added set of tests for some time zones but they verify jumping into DST in general.

Fixes #16395

Backport of #16430
@MaximLipnin MaximLipnin deleted the tz_dst_2020 branch September 30, 2019 20:21
# Conflicts:
#	mcs/class/corlib/Test/System/TimeZoneInfoTest.cs
scott-ferguson-unity pushed a commit to Unity-Technologies/mono that referenced this pull request Nov 13, 2020
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 mono#16395
scott-ferguson-unity pushed a commit to Unity-Technologies/mono that referenced this pull request Nov 19, 2020
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 mono#16395
scott-ferguson-unity pushed a commit to Unity-Technologies/mono that referenced this pull request Dec 15, 2020
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 mono#16395
cprasad-rythmos pushed a commit to Unity-Technologies/mono that referenced this pull request Dec 21, 2020
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 mono#16395
cprasad-rythmos pushed a commit to Unity-Technologies/mono that referenced this pull request Dec 28, 2020
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 mono#16395
cprasad-rythmos pushed a commit to Unity-Technologies/mono that referenced this pull request Dec 28, 2020
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 mono#16395
cprasad-rythmos pushed a commit to Unity-Technologies/mono that referenced this pull request Dec 28, 2020
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 mono#16395
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Mobile] DateTime.Now returns incorrect local time for one hour after entering DST in 39 locales.

4 participants