BigKat wrote:
> I have a jsp / portlet / webservices application that has realtime
> graphing capabilities. The problem I am having is when the machine
> that is serving up the jsp / portlet is in a different timezone than
> the machine that the browser is running on.
>
> For example, application / server machine is running in New York,
> therefore that is where the locale from the request is from. The
> browser is being run on a box in California.. The data showing up in
> the graph is in the New York timezone. So it appears to be 3 hours
> off for the user that has his web browser on his pc in his office.
>
> So now to my question. Has anyone retrieved the browsers machine
> timezone. My thought is that the code would have to be in a jsp (some
> script language??).
>
> any help would be appreciated.
Don't use relative times, use absolute times. I.e. do away with the ambiguity of
local timezones, DST etc. and use UTC in all communication between the client
and server. Let the client display the time in whatever way is appropriate,
UTC, local, with or without DST etc.
--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail :
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555