[英]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. 我在Ical.Net版本= 4.0.1.0及更低版本中面临此问题,当我们在DTSTART / DTEND中获得“ GMT-0500”时,它给出的utc时间与AsUtc中的本地时间相同。 But If I replace "GMT-0500" to "Canada/Eastern" manually in ics its giving correct utc time in AsUtc.
但是,如果我在ics中手动将“ GMT-0500”替换为“ Canada / Eastern”,则可以在AsUtc中给出正确的utc时间。
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. GMT-0500
不是有效的IANA时区。 Here's the list of IANA time zones . Etc/GMT+5
. Etc/GMT+5
。 Canada/Eastern
is deprecated. Canada/Eastern
地区。 I suggest you use America/Toronto
instead. America/Toronto
。 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 . 正如我在发行说明中指出的那样,还存在一些缓存
AsUtc
值的错误。 I suggest upgrading to 4.latest. 我建议升级到4.latest。 It should be backwards compatible .
它应该向后兼容 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.