OK, here is an update:
If i set is_dst to 1 in mktime, the event appears correctly in google calendar. However, this doesn't satisfy me because is_dst is deprecated, and i don't want to have to change this value manually twice a year and i don't understand why +00:00 appears at the end of the atom date regardless of what is_dst is set to. The server is on europe/london, php is on europe/london, the calendar is on europe/london, the event being submitted contains the correct start time. What i don't understand is I'm submitting an event at a certain time and something at somepoint decides to add an hour on to the submitted time for brittish summer time. Its not like i want to know what time it will be then! I'm submitting an event! *sob* On 2 Sep 2008, at 10:20, Peter Lenagh wrote: > +00:00 is the default when i don't set is_dst. > > I changed the server to Europe/London (from UTC) and this didnt fix > the problem. > > How can I write a conditional statement so that I can set is_dst > only when it... is dst? > > > Thanks! > > On 29 Aug 2008, at 21:50, Ray Baxter wrote: > >> >> >> On Aug 29, 2008, at 1:35 PM, Peter Lenagh wrote: >> >>> >>> thanks for the reply. >>> >>> >>> I changed my calendar to GMT (no daylight savings) and the problem >>> persists. >>> >>> I submit an event starting on 2008-08-29T09:00:00+00:00, and it >>> appears in the calendar as 10:00. >>> >>> What should i do? surely this works fine for most people. >> >> >> Did you check the output of mktime on your system? >> >> Compare the results of setting $is_dst to 1, 0 and -1, to the results >> when you don't set $is_dst. If you have shell access to your server >> what is the output of date? >> >> Ray >> >>> >>> thanks again. >>> >>> On 29 Aug 2008, at 21:23, Ray Baxter wrote: >>> >>>> >>>> >>>> On Aug 29, 2008, at 12:28 PM, Peter wrote: >>>> >>>>> I have a form where I can add an event to the calendar. My problem >>>>> is, >>>>> the event is added 1 hour ahead of when it should be added. >>>>> >>>>> I'm in the UK, in Brittish Summer Time, and i think thats causing >>>>> the >>>>> issue. I am submitting the events as GMT (+00:00), and google >>>>> calendar >>>>> is set to GMT. >>>> >>>> >>>> The Google Calendar UI can be confusing when it comes to GMT. I >>>> assume >>>> that what you have set on your calendar is "(GMT+00:00) London." >>>> That >>>> is the only time zone that you can see if you have selected the >>>> UK as >>>> your country and haven't checked the "Display all timezones" box. >>>> If >>>> you check that box, you can see there there is also a selection for >>>> "(GMT +00:00) GMT (no daylight saving)". So you are submitting >>>> events >>>> as GMT, but Google calendar is displaying them as BST. You need to >>>> either change your calendar display, or change the way that you are >>>> submitting them. >>>> >>>> >>>>> If i try to add an event in, say, december (when were back to >>>>> +00:00) >>>>> it is added correctly, so im sure the problem is to do with the >>>>> timezones. >>>>> >>>>> How can i change the timezone on the following piece of code, >>>>> and is >>>>> it possible to have a conditional statement so that the timezone >>>>> is >>>>> only changed during the summer? >>>>> >>>>> $start = date(DATE_ATOM, mktime($hour,$min,0, $month,$day,$year)); >>>> >>>> >>>> mktime takes an additional argument, $is_dst. Exact usage will >>>> depend >>>> on how your system is configured. >>>> >>>> Ray >>>> >>>> -- >>>> Ray Baxter >>>> [EMAIL PROTECTED] >>>> >>>> >>>>> >>> >>> >>> >> >> >> > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Calendar Data API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-calendar-help-dataapi?hl=en -~----------~----~----~----~------~----~------~--~---
