Hello All,

How can I force a GWT DateBox to choose dates in a particular time
zone?  Users off this application might be in many time zones, but,
for this purpose, any date entered should be in "America/Denver".
Since one of the people who enter this information works in eastern
time the dates he enters appear a day before the date he enters. I've
searched this list and googled in general, but I can't find how to
override the default time zone for a DateBox.

Code:

Some constants universally available:

  public static final TimeZoneConstants timeZoneConstants =
GWT.create(TimeZoneConstants.class);
  public static final TimeZone usMountain =
TimeZone.createTimeZone(timeZoneConstants
      .americaDenver());
  public static final DateTimeFormat dateDtf =
DateTimeFormat.getFormat("MM/dd/yyyy");


Code that displays the date:
  String displayDate = Constants.dateDtf.format(d, usMountain)

The DateBox where the date is entered:
  DateBox.DefaultFormat pickerFormat = new
DateBox.DefaultFormat(Constants.dateDtf);
  DateBox myDb = new DateBox(new DatePicker(), null, pickerFormat);

There are many places I could expect to be able to set the Time Zone:
on the DateTimeFormat, on the DateBox.DefaultFormat, on the DateBox,
in DateBox.getCalendarModel() . . .  Any I blind? I can't see the
method anywhere.

Thanks,
Eric


-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to