In our application, TimeZone is a user preference. Regardless of where they 
are in the world and how their computer and browser are configured, our 
application renders using their preference.

Basically, "time zone A" as you call it is authoritative and "time zone B" 
is ignored. Our date and time controls, called UTCDateBox and UTCTimeBox, 
are written to operate independently of the browser's TimeZone.

For example, suppose a user is editing an event taking place at 7pm Sept 
10th EDT (about 30 minutes from now as I type this). If their user 
preference TimeZone is EDT, the server will tell the controls to render 
"7:00 PM" and "Sept 10th, 2012". If the user preference TimeZone is JST, 
the server will tell the controls to render "8:00 AM" and "Sept 11, 2012". 
The controls themselves don't care about TimeZone. When the values come 
back to the server, the proper Java Date will be created that corresponds 
to the proper time using the values from the controls with the user's 
preferred TimeZone.

If that doesn't make sense, I'm happy to clarify further.

-Andy

On Monday, September 10, 2012 5:11:39 PM UTC-4, Andrei wrote:
>
> Andy,
>
> Great post. I just finished my own implementation of the same controls, 
> and I followed the same logic with one exception.
>
> You say that your server knows a user's time zone. How? A user may travel 
> and access your site from a different computer set to a different time 
> zone. So, what happens when a user has time zone A stored in his profile, 
> but he accesses your site from time zone B?
>
> I decided to implement a proper TimeZone object on the client, which 
> allows me to show dates and times (and to take dates and times) in any time 
> zone a user chooses, regardless on the browser time zone.
>
> I'd appreciate your thoughts.
>
> Andrei
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/lw1VzNtQKJsJ.
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