Changed my timezone to GMT +1 (Berlin) and it returns -1!  w00t!!!  I'll
stick to that function then.

On 2/24/07, Philipp Kewisch <[EMAIL PROTECTED]> wrote:
>
>
> Try setting your timezone to Europe/Berlin (GMT+1) and see if it
> returns -1. If so then you could just do
>
> trace(-my_date.getTimezoneOffset() / 60)
>
> I would suggest that. getTimezoneOffset seems like the correct
> function to use. Otherwise its probably
> possible to workaround that bug with the following logic:
>
> * If the day in local time is one day after the day in utc time, and
> the hour in local time is larger than the hour in utc time, the offset
> is negative
> ...
>
> I hope you get the picture, I'm pretty tired :-}
>
> Philipp
>
> On Feb 24, 7:38 pm, "Jesse Warden" <[EMAIL PROTECTED]> wrote:
> > ...ok, after more coffee, apparently I can do this:
> >
> > var my_date:Date = new Date();
> > trace(my_date.getTimezoneOffset() / 60); // prints 5
> >
> > It's not negative, though...
> >
> > Another guy did this:
> >
> > http://proto.layer51.com/d.aspx?f=574
> >
> > :: shrugs :: Any clue which way is the best way?  If not, suggested way?
> >
> > On 2/24/07, Jesse Warden <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > Yeah, you can do subtraction.  Like, here's what I got this morning
> after
> > > coffee:
> >
> > > // local time minus UTC
> > > var d:Date = new Date();
> > > var hours:Number = d.getHours();
> > > var utc:Number = d.getUTCHours();
> > > var offset:Number = hours - utc;
> > > trace(offset); // prints -5
> >
> > > Looks right since you got -5, right (I'm on east coast)?
> >
> > > As far as timezone offset, not sure... maybe I just don't know what to
> > > look for the in the API?  I can't use AS3, have to use AS2/AS1 (since
> this
> > > is for a phone):
> >
> > >http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwh.
> ..
> >
> > > On 2/24/07, Philipp Kewisch <[EMAIL PROTECTED]> wrote:
> >
> > > > The offset is your timezone offset in hours. Depending on which side
> > > > you are on, your offset is either -5 hours or +19 hours. (i.e-05:00)
> >
> > > > You probably need more than just the hours. Does flash not have a
> way
> > > > to subtract two dates or give you your timezone offset?
> >
> > > > Philipp
> >
> > > > On Feb 24, 5:39 am, "Jesse Warden" <[EMAIL PROTECTED]> wrote:
> > > > > Ok, Jayred helped me understand the time offset is needed if you
> are
> > > > not on
> > > > > GMT time (2nd reply of his):
> >
> > > > >
> http://groups.google.com/group/google-calendar-help-dataapi/browse_th.
> > > > ..
> >
> > > > > And then I read this (4.2 Local Offsets section):
> >
> > > > >http://www.ietf.org/rfc/rfc3339.txt
> >
> > > > > So, they said I could basically subtract my local timezone from
> UTC to
> > > > get
> > > > > the offset (I think).  So, booted up Flash, and did this:
> >
> > > > > // currently 11:34pm when code was run
> > > > > var d:Date = new Date();
> > > > > trace(d.getHours());      // prints out 23
> > > > > trace(d.getUTCHours ());   // prints out 4
> >
> > > > > Rad.  So, my time offset would be:
> >
> > > > > -04:00
> >
> > > > > Correct?
> >
> > > > > Meaning, the date string I'd send would sort of look like:
> >
> > > > >http://www.google.com/calendar/feeds/[removed<
> http://www.google.com/calendar/feeds/%5Bremoved>some id
> >
> > > >
> thinghere]%40group.calendar.google.com/private/full?start-min=2007-02-18T00:00:00-04:00&start-max=2007-02-18T23:59:59-04:00
> >
> > > > > ???
>
>
> >
>

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