Date object does not have a time zone information. You see a time zone when 
you print/display the date object, and the machine is using its own time 
zone by default.

I save all dates in the datastore as Long values: date.getTime(). When I 
need to display a date in a browser, I pass the GWT TimeZone object. For 
example,


private static DateTimeFormat format = 
DateTimeFormat.getFormat(PredefinedFormat.DATE_MEDIUM); 

public void setDate(Long date, TimeZone timeZone) { 
    setValue(date == null ? null : format.format(new Date(date), 
timeZone)); 
}

You can read more about GWT TimeZone here:

http://www.gwtproject.org/javadoc/latest/com/google/gwt/i18n/client/TimeZone.html

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to