Using gwt-incubator-20100204-r1747.jar
I'm calling
com.google.gwt.gen2.picker.client.TimePicker.setDate(Date), which is
supposed to set the date without affecting the time. I'm finding that
the resulting date is one day later than that which is set. I looked
at the code, and noticed a "+ 1", the purpose of which I don't
understand, and would explain my results. Am I missing something?
/**
* @param date the date to be set. Only the date part will be set,
the time
* part will not be affected
*/
public void setDate(Date date) {
// Only change the date part, leave time part untouched
dateInMillis = (long) ((Math.floor(date.getTime() / DAY_IN_MS) +
1) * DAY_IN_MS)
+ dateInMillis % DAY_IN_MS;
for (TimeSpinner spinner : timeSpinners) {
spinner.getSpinner().setValue(dateInMillis, false);
}
}
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
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.