ICS timezone not working
Asked Answered
M

2

29

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
Macswan answered 2/10, 2011 at 11:41 Comment(0)
R
58

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.

Rakehell answered 2/10, 2011 at 11:45 Comment(3)
Removing the "Z" works fine using iCal but Google Calendar will show times which are only one hour long. Specifying the timezone at every start and end time as you show didn't have any effect. Instead I made UTC time (e.g. 07:55 becomes 05:55) Thank you for your help.Macswan
@SimonBS: You may need to provide the time zone information in the event too to get that to work... but if the UTC way works, I'd just stick with that :)Rakehell
An hour of googling and hair pulling to find out it was the "Z"... thank you so MUCH!Columbine
L
0

You need also to add your time zone TZID in a VTIMEZONE calendar component.

Add this before VEVENT

BEGIN:VTIMEZONE
TZID:Europe/Copenhagen
BEGIN:DAYLIGHT
TZNAME:CEST
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZNAME:CET
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE

You can go to link form more info.

Leucopoiesis answered 5/7, 2022 at 10:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.