There are two different places to set the time zone, the calendar, and
for the user as a whole. Make sure that these are the same, or make
appropriate allowances.
You set the time zone for the calendar under Calendar Settings =>
Calendar Details => Calendar Time Zone.
You set the user time zone under the top tab Settings => Your current
time zone.
The UI shows times in corresponding to the Your current time zone
setting. The API returns events in the time zone of the calendar.
Let us know if you continue to have problems.
Ray
On Sep 1, 2008, at 7:33 PM, Gines wrote:
>
> Dear all,
>
> I am having an issue when retrieving events from a calendar.
>
> My calendar is set to "(GMT-03:00) São Paulo" and when I got the
> results it appears:
>
> 2008-08-31T17:00:00.000-10:00|2008-08-31T18:00:00.000-10:00
> 2008-09-01T16:00:00.000-10:00|2008-09-01T16:59:00.000-10:00
>
> Why the -10:00 is showing, if I have the calendar set to -03:00?
>
> But should be:
> 2008-09-01T00:00:00.000-03:00|2008-09-01T01:00:00.000-03:00
> 2008-09-01T23:00:00.000-03:00|2008-09-01T23:59:00.000-03:00
>
> The code I am running is listed below,
>
> Thanks in advance,
>
> Gines
>
> function outputCalendar($client)
> {
> $gdataCal = new Zend_Gdata_Calendar($client);
> $query = $gdataCal->newEventQuery();
> $query->setUser('default');
> $query->setVisibility('private');
> $query->setProjection('full');
> $query->setOrderby('starttime');
> $query->setSortorder('ascending');
> $query->setFutureevents(false);
> $query->setSingleevents(true);
> $query->setStartMin('2008-09-01T00:00:00.000-03:00');
> $query->setStartMax('2008-09-01T23:59:59.000-03:00');
> $eventFeed = $gdataCal->getCalendarEventFeed($query);
> foreach ($eventFeed as $event) {
> echo $event->title->text;
> // Zend_Gdata_App_Extensions_Title->__toString() is defined, so
> the
> // following will also work on PHP >= 5.2.0
> //echo "\t<li>" . $event->title . " (" . $event->id . ")\n";
> foreach ($event->when as $when) {
> echo "|" . $when->startTime . "|" . $when->endTime . "<br>";
> }
>
> }
> }
>
> >
--
Ray Baxter
http://67central.com/bc/
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---