简体   繁体   中英

Ical.Net: Event's AsUtc flag is not updating correctly

I am facing this issue in Ical.Net Version=4.0.1.0 and lower, When we get "GMT-0500" in DTSTART/DTEND then it is giving same utc time as local time in AsUtc. But If I replace "GMT-0500" to "Canada/Eastern" manually in ics its giving correct utc time in AsUtc.

Following is not working fine -:

DTSTART;TZID=GMT-0500:20181213T190000
DTEND;TZID=GMT-0500:20181213T220000

Following works fine -:

DTSTART;TZID=Canada/Eastern:20181213T190000
DTEND;TZID=Canada/Eastern:20181213T220000
  • GMT-0500 isn't a valid IANA time zone. Here's the list of IANA time zones . You want Etc/GMT+5 .
  • Canada/Eastern is deprecated. I suggest you use America/Toronto instead.

In general, I suggest you familiarize yourself with the actual time zone names instead of guessing as to what they might be, and hoping for the best.

There were also some bugs with caching AsUtc values, as I noted in the release notes . I suggest upgrading to 4.latest. It should be backwards compatible .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM