Lucky for you the Java Date object handles timezones for you.  As long
as you are okay with an an accuracy of up to 5 secs you should be okay
with this method.  Are you using GWT RPC?  If so, just create a method
that returns a new Date from the server.  If not, create a servlet
that just outputs new Date().getTime() and you can instantiate a Date
with that long client side.  Java's Date object is based off Unix
time, so if you want to know more about how that works Google it.

On Aug 10, 3:21 am, Ed <[email protected]> wrote:
> I do date/time comparision in the browser and I can't assume that the
> browser date/time is correct so I think I have to synchronize the date/
> time on the server with that on the browser as I know the server date/
> time is correct.
>
> Anybody any experience with that? or Idea's?
>
> I was thinking about retrieving the date/time from the server at
> startup of the app and then calculating the difference with that of
> the browser and add that as offset each time the date/time is
> retrieved in the browser.
>
> But what about different timezones?...
> Suppose somebody opens my website in another timezone, how does this
> effect the date/time that comes from the server. how is that seen in
> the browser? Hmmmm I am a bit lost here.
>
> Please some advice?

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