This is probably happening because the timezone rules are different between java and the brower. When you send a date, you're sending a millisecond offset. Also, if the browser is in a different timezone than the server, you can be a day off your dates if the (hidden) time is close to midnight.
My advice would be, if you need a date object that has no time component, create a simple dto or use a string, this way, you're sure it will be the same date regardless of timezones. Pascal On Apr 22, 10:44 am, Stephan <[email protected]> wrote: > I've run into quite a strange issue serializing dates from the browser > to the server. > > When I enter the following dates in the browser I receive for some > dates the wrong value at the server side (using date pattern dd-MM- > yyyy): > > 1-1-1968 -> Mon Jan 01 00:00:00 CET 1968 - correct > 1-3-1968 -> Fri Mar 01 00:00:00 CET 1968 - correct > 1-4-1968 -> Sun Mar 31 23:00:00 CET 1968 - wrong > 4-4-1968 -> Wed Apr 03 23:00:00 CET 1968 - wrong > 1-4-1999 -> Thu Apr 01 00:00:00 CEST 1999 - correct > > Note that in April 1968 there is a 1 day difference. This problem does > not occur in hosted mode, only in web mode. > > Perhaps i've messed up somehow, perhaps someone else can try as well. > > thanks, > > Stephan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
