Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ics file issues

I have a sample ics file like this

BEGIN:VCALENDAR
VERSION:1.0
BEGIN:VEVENT
DTSTART;TZID=America/New_York:20120328T073000
DTEND;TZID=America/New_York:20120328T093000
SUMMARY:Test EVENT
LOCATION:Test Location
DESCRIPTION:Test Description
PRIORITY:3
END:VEVENT
END:VCALENDAR

It works fine when importing to Google Calendar but in Outlook the times are off by 2 hours. What can be the issue?

Regards, Neel

like image 603
daydreamer Avatar asked Sep 25 '26 05:09

daydreamer


1 Answers

to secure behaviour compatible with your expectation you need to define your tzid in a "VTIMEZONE" calendar component.

see https://www.rfc-editor.org/rfc/rfc5545 §3.2.19. Time Zone Identifier This property parameter specifies a text value that uniquely identifies the "VTIMEZONE" calendar component

and

3.6.5.  Time Zone Component
Component Name:  VTIMEZONE
Purpose:  Provide a grouping of component properties that defines a time zone.

something like this added on top of your calendar (before vevent) would do the job:

BEGIN:VTIMEZONE
TZID:America/New_York
LAST-MODIFIED:19870101T000000Z
BEGIN:STANDARD
DTSTART:19971026T020000
RDATE:19971026T020000
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:19971026T020000
RDATE:19970406T020000
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
END:DAYLIGHT
END:VTIMEZONE
like image 157
Auberon Vacher Avatar answered Sep 29 '26 12:09

Auberon Vacher