Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ICS timezone not working

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 
like image 699
simonbs Avatar asked Oct 02 '11 11:10

simonbs


People also ask

How do I set time zones in iCal?

In Android, open your calendar app –> go into settings. At the bottom you'll see a “Lock Time Zone” option. Use that setting to lock event times and dates to your selected time zone. This way they won't change no matter what time zone you're-in.

Do ICS links automatically update?

ics file to your existing calendar or subscribe to a calendar online and receive automatic updates (known as an ICS subscription or an iCal subscription).

What is TZID?

The presence of the SOLIDUS character as a prefix, indicates that this "TZID" represents a unique ID in a globally defined time zone registry (when such registry is defined). Note: This document does not define a naming convention for time zone identifiers.

How do I convert ICS to iCal?

To import an . ics file into Apple's iCal, simply drag and drop the . ics file onto the iCal icon in the Finder or dock, or choose "Import" from iCal's File menu.


1 Answers

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:

DTSTART;TZID=Europe/Copenhagen:20110926T075500 DTEND;TZID=Europe/Copenhagen:20110926T093000 

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.

like image 176
Jon Skeet Avatar answered Sep 28 '22 17:09

Jon Skeet