Imagine I store everything on the server according to the server’s date. However, when the user tries to access these data from the server, the user might be not in the same timezone as the server. So, basically when the user receives data from the server, I want the data’s date to be converted to user’s timezone. How can I do this in gwt, considering I’m receiving a Date object from the server? Any links or suggestions are highly welcome.
Thank you.
A
java.util.Dateobject doesn’t have a time zone. It’s a moment in time, and can be formatted using a specific time zone in order to be readable by humans. The DateTimeFormat documentation seems to indicate that it handles the browser time zone. It also has a format method taking a TimeZone as argument.