Closed ShenChen93 closed 2 days ago
I get the nextOccurent which is of type IDateTime by following code:
var occurrences = calendar.GetOccurrences(searchStartTime, searchEndTime); var nextOccurence = occurrences.First().Period.StartTime;
It has value "4/30/2023 9:00:00 PM america/mexico_city", but AsDateTimeOffset return wrong offset (It return -05:00, but it should be -06:00)
{4/30/2023 9:00:00 PM america/mexico_city} AsDateTimeOffset: {4/30/2023 9:00:00 PM -05:00} AsSystemLocal: {4/30/2023 9:00:00 PM} AsUtc: {5/1/2023 4:00:00 AM} AssociatedObject: Component: "VEVENT" Calendar: Component: "VCALENDAR" Date: {4/30/2023 12:00:00 AM} Day: 30 DayOfWeek: Sunday DayOfYear: 120 Encoding: null HasDate: true HasTime: true Hour: 21 IsUtc: false Language: null Millisecond: 0 Minute: 0 Month: 4 Parameters: {Ical.Net.Proxies.ParameterCollectionProxy} Second: 0 Ticks: 638184852000000000 TimeOfDay: {21:00:00} TimeZoneName: "america/mexico_city" TzId: "america/mexico_city" Value: {4/30/2023 9:00:00 PM} Year: 2023 _AssociatedObject: Component: "VEVENT"
Not sure if it due to mexico_city no longer use DST starting from this year
Please double-check the new version merged with #595
I get the nextOccurent which is of type IDateTime by following code:
It has value "4/30/2023 9:00:00 PM america/mexico_city", but AsDateTimeOffset return wrong offset (It return -05:00, but it should be -06:00)