On 30 oct, 08:04, anjolight <[email protected]> wrote:
> Thanks for the reply and I totally understand what you're saying and
> let me clarify my challenge.
>
> My users are in JAPAN time and they need to detect US daylight saving
> change. It's a different story from PST users adjusting for US
> daylight saving change.
>
> Any suggestion how I can detect US DST change when users are on
> Japan's time?

I'm puzzled... given that Japanese students are presented dates in
Japan timezone, they don't need to "detect US DST change". I mean, if
the lesson's hour do not change in PST local time, then it changes
relative to UTC when DST change (and because Japan's timezone is at a
fixed distance from UTC, it changes relative to Japan timezone). What
I mean is that it's not your GWT, client code that needs to change,
it's your server code that need to accommodate to DST changes.

If you store everything as UTC on the server side, and use new Date
(utcTimeStampSentByTheServer) on the client side (and d.getTime() to
send an timezone-agnostic timestamp to the server), it should "just
work". The thing is, do not transfer dates and times on the wire as
tuples of (year, month, day, hours, minutes), at least not without a
timezone information; and it's actually easier to transfer just the
offset from a fixed timezone-agnostic point in time; and Date::getTime
() and the argument to the Date(long) constructor is just that.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to