[Vobject] Example of using timezones

Jeffrey Harris jeffrey at skyhouseconsulting.com
Tue Jul 6 11:46:34 CDT 2010


Hi Richard,

> Thanks Jeff. I don't feel so bad now about not being able to work it out
> now :-)

Certainly no one should feel bad about timezones, except perhaps the RFC2445 drafters... In fairness it's a hard problem. Local time is politically determined and mutable on very little notice.

> I have also included a X-WR-TIMEZONE, as a bit of Googling suggests that
> this might be required:
> 
> X-WR-TIMEZONE:Europe/London\;+00:00\;London\;

I don't think X-WR-TIMEZONE is likely to help, in fact that seems more likely to hurt. It's non-standard and not widely used to the best of my knowledge. Perhaps Google uses this to determine a new calendar's initial timezone, but it won't do anything if you're importing events into an existing calendar (at least, it shouldn't).

> The ics file works fine when imported into iCal on my Mac, but when
> imported into Google Calendar it thinks that the times are GMT+0 so they
> are all 1 hour out!

Strange. I can't reproduce this problem. My Google calendar is set to Pacific time (currently PST, which is -7 hours offset from UTC). When I import your event (adding the necessary VERSION line and VCALENDAR container) via Google's web interface, or add via iCal + CalDAV, your 9AM BST event appears at 1AM on my Google calendar, which I think is accurate (since BST is +1 hours offset from UTC).

> Is this a problem with Google Calendar or do I need to do something
> explicit to state that the event DTSTART times are meant to be Daylight
> Saving?
> 
> Thank you again for your superb support.

Is it possible your test account's Google calendar has its timezone set to a +2 hour offset timezone? Both individual calendars and your account default can have display timezones set, and Google doesn't display the timezone they're showing you everything in, which is kind of awkward.

- Jeffrey


More information about the VObject mailing list