I’m fully aware of how complicated and dangerous working with timezones can be, especially if recurring events and daylight saving are involved.
Outsourcing calendar event creation
So when I decided that I wanted my kids school timetables in ics format and that I’d ‘outsource’ the manual data entry of it, I took great care to setup the calendars myself, specifying the Australia/Sydney Timezone. I found a great person on elance based in the states who was knowledgeable about google calendar and recurring events. I shared the time table calendars with her. She set up the events in the two timetables. I checked it and all was good for a few weeks.
Then the normal Sydney (NSW) daylight saving period ended.
And NOW all the timetable events were TWO hours out – yes two (2) ?? why?
Being knowledgeable in these matters and having done SO many tests with timezones changing daylight saving at different overlapping times etc, I knew that it must be something to do with timezones. I logged on to google and could not find anything online that told me anything. Timetable calendars still set to Sydney, but all the events now mysteriously 2 hours out.
Troubleshooting google calendar – check the ics file
I downloaded the ics file to see if that would shed any light. The ics file had a timezone definition for Australia/Sydney AND for America/New_York and ALL the class events were defined with timezone America/New_York.
Now google very clearly says that it stores the events in UTC / GMT time.
So why export events for a timezone OTHER than
- either UTC or the
- calendars timezone or
- the accounts timezone?
why not just one hour out? Had I missed the New York daylight saving change on 9 Mar? Maybe ? The times are just of the hour like 10.50 instead of 8.50 – maybe when I saw 9.50 I just thought 9 ? who knows?
How to avoid unintended timezone daylight saving clashes happening again ?
Well I’m guessing – it appears google will use the timezone of the person creating the event EVEN if the calendar is in a different timezone AND this timezone is NOT shown when one looks at the event, NOT even in event debug / troubleshooting mode (add &eventdeb=1 to your google calendar url).
The creator has to manually assign a timezone to each and every event to ensure that it gets exported correctly.
How to fix the current timetables offset by two hours?
I didn’t want to delete the existing calendars and Google allows no other easy way to delete events from any non-main calendar other than deleting the whole calendar.
I decided a temporary fix (until the next daylight change !) would be to export to ics, do a global change to a timezone 2 hours before New_York (hopefully one with out daylight saving – sadly I gave up on that)
I created a test calendar and did several iterations to check the timings. I ended up using http://gcaltoolkit.net/ to handle bulk deletes of the calendars and learnt a few things along the way:
For example: Even if you have deleted the events and want to re-import them, google will not let you. To fox it – do a gloabl change on the @google.com of the UID . Events are identified by UID.
At one stage I even felt I needed to change the file name and calendar name, but perhaps I was just tired, confused and annoyed by then.
- BACKUP all your google calendars and possibly other data first before letting another app mess with your data. Create a TEST calendar to test the whole process.
- Export your ics files, create a backup copy.
- Use something like notepad++ to do a search/replace on the timezone. Make sure your new timezone is something google will recognise and the correct UTC offset.
- Search and replace the @google.com to @yourdomain.com or really anything…(alter the event UID globally every time you re-import the file.)
- Save and close the ics file.
- Use gcaltoolkit or similar to delete the events in your target calendar (very carefully check which calendar you are accessing)
- Make a cup of tea – ieWait a few minutes, sometimes it takes google a while to update.
- Import the ics file and check the times.