ICS 时区不工作
我制作了一个 ICS 源,其中包含一长串事件。我的时区似乎不起作用。
在下面的示例中,您会看到我的活动应于 07:55:00 开始并于 09:30:00 结束。这就是我的日历中应该显示的内容。相反,它显示 09:55:00 和 11:30:00 - 偏移两个小时。时区应设置为 Europe/Copenhagen
但这没有任何效果。
谁能告诉我怎样才能达到正确的时间?
BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:Test Calendar
X-WR-TIMEZONE:Europe/Copenhagen
X-WR-CALDESC:Test Calendar
BEGIN:VEVENT
DTSTART:20110926T075500Z
DTEND:20110926T093000Z
DTSTAMP:20111002T133505Z
UID:E9QNQ30EG-5SRB7-QQKL3-2JUUZ-477LBRV4IMSJ78
CREATED:20111002T133505Z
LAST-MODIFIED:20111002T133505Z
LOCATION:B34
SEQUENCE:3
SUMMARY:2abc3c Ma3 CD (B34)
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR
I have made an ICS feed containing a long list of events. My timezone does not seem to work.
In the sample below you see that my event should start 07:55:00 and end 09:30:00. This is what it should show in my calendar. Instead it shows 09:55:00 and 11:30:00 - an offset of two hours. The timezone should be set to Europe/Copenhagen
but this does not have any effect.
Can anyone tell me how I can achieve the right times?
BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:Test Calendar
X-WR-TIMEZONE:Europe/Copenhagen
X-WR-CALDESC:Test Calendar
BEGIN:VEVENT
DTSTART:20110926T075500Z
DTEND:20110926T093000Z
DTSTAMP:20111002T133505Z
UID:E9QNQ30EG-5SRB7-QQKL3-2JUUZ-477LBRV4IMSJ78
CREATED:20111002T133505Z
LAST-MODIFIED:20111002T133505Z
LOCATION:B34
SEQUENCE:3
SUMMARY:2abc3c Ma3 CD (B34)
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您已指定您的活动在 UTC 时间 07:55 开始 - 这就是末尾的 Z 显示的内容。如果您希望它是当地时间,则不应该有 Z,并且您可能也应该在那里指定时区:
或者,使用 Z 指定 UTC 开始和结束时间,但要考虑相关时区差异- 因此,目前在欧洲/哥本哈根于 07:55 开始的活动实际上是 UTC 时间 05:55。
You've specified that your event starts at 07:55 in UTC - that's what the Z at the end shows. If you want it to be in local time, you shouldn't have the Z, and you should probably specify the time zone there too:
Alternatively, specify the UTC start and end time using Z, but taking account for the relevant time zone difference - so an event that starts at 07:55 in Europe/Copenhagen at the moment is actually 05:55 in UTC.
您还需要在
VTIMEZONE
日历组件中添加您的时区TZID
。在
VEVENT
之前添加此内容您可以转到链接形成更多信息。
You need also to add your time zone
TZID
in aVTIMEZONE
calendar component.Add this before
VEVENT
You can go to link form more info.