重复事件以 UTC 时间显示
我正在努力从我的 Android 应用程序发送会议邀请。
这是生成的 iCal。
BEGIN:VCALENDAR
VERSION:2.0
PRODID:Test//Outlook//EN
METHOD:REQUEST
BEGIN:VTIMEZONE
TZID:GMT-6 standard time
BEGIN:STANDARD
DTSTART:16010101T020000
TZOFFSETFROM:-0500
TZOFFSETTO:-0600
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T020000
TZOFFSETFROM:-0600
TZOFFSETTO:-0500
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DESCRIPTION;ENCODING=QUOTED-PRINTABLE:this is a recurring event
SUMMARY;ENCODING=QUOTED-PRINTABLE:RecurringEvent
DTSTART:20100618T010000Z
DTEND:20100618T020000Z
DTSTAMP:20100618T004215Z
LOCATION;ENCODING=QUOTED-PRINTABLE:Someplace
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=Sagar:MAILTO:[email protected]
RRULE:FREQ=WEEKLY;BYDAY=TH
SEQUENCE:0
UID:040000008200E00074C5B7101A82E008000000000000000000000000000000000000000
010000000251D69F4288A137B1891F782A1836CCB
END:VEVENT
END:VCALENDAR
此活动于CDT 晚上 8 点开始,到 CDT 晚上 9 点结束。但是,当 Outlook 中收到此会议请求时,“时间”部分显示为“2010 年 6 月 17 日星期四 01:00AM-02:00AM GMT-5 标准时间”。
编辑: 我正在使用 Android 2.x (Eclair) 电子邮件和日历源代码发送会议请求。
I am working on sending Meeting Invites from my Android app.
Here is the generated iCal.
BEGIN:VCALENDAR
VERSION:2.0
PRODID:Test//Outlook//EN
METHOD:REQUEST
BEGIN:VTIMEZONE
TZID:GMT-6 standard time
BEGIN:STANDARD
DTSTART:16010101T020000
TZOFFSETFROM:-0500
TZOFFSETTO:-0600
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T020000
TZOFFSETFROM:-0600
TZOFFSETTO:-0500
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DESCRIPTION;ENCODING=QUOTED-PRINTABLE:this is a recurring event
SUMMARY;ENCODING=QUOTED-PRINTABLE:RecurringEvent
DTSTART:20100618T010000Z
DTEND:20100618T020000Z
DTSTAMP:20100618T004215Z
LOCATION;ENCODING=QUOTED-PRINTABLE:Someplace
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=Sagar:MAILTO:[email protected]
RRULE:FREQ=WEEKLY;BYDAY=TH
SEQUENCE:0
UID:040000008200E00074C5B7101A82E008000000000000000000000000000000000000000
010000000251D69F4288A137B1891F782A1836CCB
END:VEVENT
END:VCALENDAR
This event starts at 8 p.m. CDT and ends at 9 p.m. CDT. However, when this meeting request is received in Outlook, the "when" section reads as "Thursday, June 17, 2010 01:00AM-02:00AM GMT-5 standard time".
EDIT:
I am sending a meeting request from using Android 2.x (Eclair) source code for email and calendar.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我自己想出来了!
对于重复发生的事件,我将 TZID(在 VTIMEZONE 中“定义”)附加到 DTSTART 和 DTEND 并发送当地时间。
有用!
甚至 Outlook 也采用同样的方式。
I figured it out myself!
For recurring events, I append the TZID ('defined' in VTIMEZONE) to the DTSTART and DTEND and send the local times.
It works!
Even Outlook does it the same way.