导入ICS事件的时间错误 [英] Wrong Time When Importing ICS Event

查看:60
本文介绍了导入ICS事件的时间错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 .ics 文件,该文件具有以下iCalendar代码:

I have a .ics file that has the following iCalendar code:

BEGIN:VCALENDAR

PRODID;X-RICAL-TZSOURCE=TZINFO:-//Company Name//NONSGML example.co
 m//EN
CALSCALE:GREGORIAN
VERSION:2.0
METHOD:PUBLISH

BEGIN:VTIMEZONE
TZID;X-RICAL-TZSOURCE=TZINFO:America/Los_Angeles
BEGIN:DAYLIGHT
DTSTART:20180311T020000
RDATE:20180311T020000
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
TZNAME:PDT
END:DAYLIGHT
END:VTIMEZONE

BEGIN:VEVENT
CREATED;VALUE=DATE-TIME:20180622T002920Z
DTEND;TZID=America/Los_Angeles;VALUE=DATE-TIME:20180703T173000
DTSTART;TZID=America/Los_Angeles;VALUE=DATE-TIME:20180703T170000
DTSTAMP;VALUE=DATE-TIME:20180622T002920Z
ATTENDEE#<Client 1234 "Lorem Ipsum">
UID:id@example.com
DESCRIPTION:Super Secret Event
URL:https://example.com/path/id
SUMMARY:Super secret summary
ORGANIZER;CN=Tamer Shlash;CUTYPE=INDIVIDUAL;PARTSTAT=A
 CCEPTED:mailto:noreply@example.com
SEQUENCE:0
END:VEVENT

END:VCALENDAR

但是,当我在Android设备上下载文件并导入文件时,该事件已关闭1小时。在Mac或iPhone设备上进行尝试会在正确的时间导入事件。

However, when I download the file on an Android device and import it, the event is off by 1 hour. Trying on a Mac or iPhone device will import the event with the correct time.

有人知道为什么我在Android上出现这种奇怪的行为吗?

Any idea why I'm getting this weird behaviour on Android?

推荐答案

您对美国/洛杉矶的VTIMEZONE定义是虚假的。它缺少标准组件。要查看其外观,只需邀请自己参加任何客户端的会议并查看生成的ics文件即可。

Your VTIMEZONE definition for America/Los Angeles is bogus. It is missing a STANDARD component. To see what it should look like, just invite yourself to a meeting from any client and look at the resulting ics file.

事情在Mac / iOS上是有效的,因为那些客户端倾向于忽略实际定义,而只是依靠TZID = America / Los_Angeles将其映射到自己的定义。

Things are working on Mac/iOS because those clients tend to ignore the actual definition and just rely on the TZID=America/Los_Angeles to map it to their own definition.

这篇关于导入ICS事件的时间错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆