Fix tz rules (dotnet/coreclr#10169)
authorTarek Mahmoud Sayed <tarekms@microsoft.com>
Tue, 14 Mar 2017 19:12:04 +0000 (12:12 -0700)
committerGitHub <noreply@github.com>
Tue, 14 Mar 2017 19:12:04 +0000 (12:12 -0700)
commit7bcdbba667c50c701defb05472367e931ba3d7a9
treef7e6c26ec0c5380b443686eeb2e8b5add05451db
parentd488016a76003b9d713a19a8f18c01abfdd12d4a
Fix tz rules (dotnet/coreclr#10169)

* Fix the TZ Rule data on Linux

On Linux when the caller ask for the TZ adjustment rules we convert the internal stored rule data from UTC to local time. we used to TZI.Convert which is wrong because calculating the start the daylight start time should always not include the daylight delta because we didn't start the daylight saving yet. and calculating the end of daylight should always include the daylight delta because we were in the daylight saving period.

The fix here is manually calculating the start and end of the daylight saving inside the rule

* Revert the comment change

* Add a comment

Commit migrated from https://github.com/dotnet/coreclr/commit/c2b5d5a707e3bb037df847e17b4e55e19fd5bfa8
src/coreclr/src/mscorlib/src/System/TimeZoneInfo.Unix.cs