You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a timezone is added which does not observe Daylight Savings Time, the minimum UTC offset which was ever used for the timezone is used which can be incorrect if the timezone has ever increased the UTC offset it uses.
For example:
A calendar with a timezone of "America/Cayman" reports the offset as -05:19:36 (which was from 01/01/1890 - 22/04/1908). Since 22/04/1908, the correct offset is -05:00:00.
A calendar with a timezone of "Asia/Singapore" reports the offset as 06:55:25 (which was from the beginning of time - 31/05/1905). Since 31/12/19818, the correct offset is 08:00:00.
string timezone = "Asia/Singapore";
var iCal = new Ical.Net.Calendar();
iCal.AddTimeZone(timezone);
Console.WriteLine("The reported offset is: " + ((VTimeZoneInfo)iCal.TimeZones[0].Children[0]).OffsetTo);
The issue is because NodaTime treats the current timezone interval as not having an end time. Code at VTimeZone.cs:47 specifically excludes timezone intervals which don't have an end time incorrectly.
The text was updated successfully, but these errors were encountered:
mfields3
pushed a commit
to mfields3/ical.net
that referenced
this issue
May 3, 2018
When a timezone is added which does not observe Daylight Savings Time, the minimum UTC offset which was ever used for the timezone is used which can be incorrect if the timezone has ever increased the UTC offset it uses.
For example:
The issue is because NodaTime treats the current timezone interval as not having an end time. Code at
VTimeZone.cs:47
specifically excludes timezone intervals which don't have an end time incorrectly.The text was updated successfully, but these errors were encountered: