I've a php based application where I've integrated GCal with OAuth 2.0 API. Everything works fine except the DST +1 hour issue. This application is only for UK and I'm also storing the user account timezones. If I'm adding a task at 3:00 AM, on GCal it shows me 4:00 AM. This is when I've hard coded the timezone as Europe/London in setTimeZone() while adding task. Moreover the GCal account setting is also as Europe/London. This is bit frustrating so please help me on what should I change in my code to handle this DST +1 hour time difference. Here is the code :
$evt = new Event();
$evt->setDescription($txtDesc);
$evt->setSummary($taskTypeTxt);
#--Setting Event Date
$evtDT = new EventDateTime();
$evtDT2 = new EventDateTime();
$evtDT->setDateTime($startDate);
$evtDT->setTimeZone('Europe/London');
$evtDT2->setDateTime($endDate);
$evtDT2->setTimeZone('Europe/London');
$evt->setOriginalStartTime($evtDT);
$evt->setStart($evtDT);
$evt->setEnd($evtDT2);
$field = array('items/id');
$evtId = $cal->events->insert($user_email,$evt,$field);
I'm suffering the same problem.
There seems to be some ambiguity over whether to set the timezone to GMT+0 or GMT+1 (BST). The latter would imply that I will subsequently have to handle DST changes manually, but when I set GMT+0 it didn't automatically update when the clocks changed.