They chose to set it to noon because certain timezones do not have a 0 at day light savings time. If you set the time to 0 on one of these date/timezone combinations, if I understood correctly, the date will roll back and not forward. Causing the date to be set to the previous day instead of the correct day. I'm not sure I agree with the solution but it is probably the simplest solution with the least amount of overhead. It is what it is... I don't recall where this was recorded, but if you do some digging there are issues or threads out there with more information. Also, the problem has been recorded in the issue tracker: http://code.google.com/p/google-web-toolkit/issues/detail?id=4785
On Friday, September 7, 2012 9:33:08 AM UTC-4, Andrei wrote: > Jens, > > You were right about DatePicker setting dates to noon. I created an issue: > > http://code.google.com/p/google-web-toolkit/issues/detail?id=7650 > > It's a minor problem, of course, since you can always do > > Long date = datePicker.getValue().getTime(); > return new Date(date - date % (24 * 60 * 60 * 1000)); > > to set any date object to midnight. Still, it was a headache as I was > implementing time zone management in my app. Thank you for pointing this > issue. > > Andrei > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/DEjz5_NgqH8J. 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.
