OK, I've been experimenting with the handling of TZ offset issues and
all day events in the calendar. It wasn't that hard to work around the
offset issue using Calendar functions in Java and checking to see if
events returned had a time zone offset or not (0 means it's GMT, add
my time zone offset. My implementation is as follows.

When next = (When)whens.get(i);
DateTime st = next.getStartTime();
DateTime et = next.getEndTime();
Calendar calStart = Calendar.getInstance();
Calendar calEnd = Calendar.getInstance();

if (st.getTzShift()) {
        calStart.setTimeInMillis(st.getValue());
        calEnd.setTimeInMillis(et.getValue());
}
else {
        tzshift = (calStart.get(calStart.ZONE_OFFSET) +
calStart.get(calStart.DST_OFFSET));
        calStart.setTimeInMillis(st.getValue() - tzshift);
        calEnd.setTimeInMillis(et.getValue() - tzshift);
}

However, DST_OFFSET doesn't seem to be working in either OS X 10.5 or
Fedora 9 (Sun's Java). I'm not sure if I'm doing something wrong or
what. All events before this weekend come out with the correct time,
but events past November 1st are an hour earlier than they should be.
Am I just making some bonehead mistake, or is there something I'm
missing? Thanks for any help.

Also, what's the status on all day events coming back without a TZ.
I've seen questions and at least one explanation, but that was from
several months ago. Is there any news on how to manage this better,
even if Google doesn't plan on changing/fixing the behavior?

-Pete

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to