2013-05-08 55 views
0

我有這樣的iCal文件:在iCalendar檔案時區問題

 
BEGIN:VCALENDAR 
METHOD:REQUEST 
PRODID:Test 
VERSION:2.0 
BEGIN:VTIMEZONE 
TZID:TestZone 
BEGIN:STANDARD 
DTSTART:20130509T120000 
RDATE:20130509T120000 
TZOFFSETFROM:-0000 
TZOFFSETTO:-0000 
END:STANDARD 
END:VTIMEZONE 
BEGIN:VEVENT 
DTSTART;TZID=TestZone:20130509T120000 
DTEND;TZID=TestZone:20130509T130000 
SUMMARY:Hi! You have set a appointment with us! 
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE:MAILTO:[email protected] 
ORGANIZER:MAILTO:[email protected] 
LOCATION:Test Street 
DESCRIPTION:Appointment 
SEQUENCE:0 
PRIORITY:5 
CLASS:PUBLIC 
STATUS:CONFIRMED 
TRANSP:OPAQUE 
BEGIN:VALARM 
ACTION:DISPLAY 
DESCRIPTION:REMINDER 
TRIGGER;RELATED=START:-PT00H15M00S 
END:VALARM 
END:VEVENT 
END:VCALENDAR 

但是,當我在我的Gmail加載它,它說的日曆設置爲10:00 - 11:00

enter image description here

爲什麼會發生這種情況,如果我的VTIMEZONE配置沒有設置任何偏移?以及如何在日曆中獲取實際的DTSTART和DTEND時間?

+0

@oberon拉着我應該添加一個標籤與一個跟隨者給予利益的問題嗎? – 2014-02-07 13:38:02

回答

3

的RFC是在這裏:http://tools.ietf.org/html/rfc5545

你必須與定義偏移TZID指定本地時間。

例子:

DTSTART;TZID=America/New_York:19970714T133000 

您需要在ICS文件使用VTIMEZONE組件。

BEGIN:VTIMEZONE 
TZID:America/New_York 
LAST-MODIFIED:20050809T050000Z 
BEGIN:DAYLIGHT 
DTSTART:19670430T020000 
RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=-1SU;UNTIL=19730429T070000Z 
TZOFFSETFROM:-0500 
TZOFFSETTO:-0400 
TZNAME:EDT 
END:DAYLIGHT 
BEGIN:STANDARD 
DTSTART:19671029T020000 
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU;UNTIL=20061029T060000Z 
TZOFFSETFROM:-0400 
TZOFFSETTO:-0500 
TZNAME:EST 
END:STANDARD 
END:VTIMEZONE 

這些例子是從RFC 5545