Hi, I have GWT 1.7 I am feeding the following to DateTimeFormat function "format(Date date, TimeZone timeZone)": Date: Sun Mar 14 04:00:00 EDT 2010 TimeZone: America/Vancouver created with TimeZoneConstant Properties.
The function returns me back String "2010-03-13" whereas it should be "2010-03-14" because the Date I am providing to format function should correspond to Sun Mar 14 00:00 even in Vancouver time zone. I think this is happening because of the time zone change that happened on March 14th so Eastern switches to EDT before Pacific (Vancouver) switches to PDT. Therefore this line of code gives incorrect result int diff = (date.getTimezoneOffset() - timeZone.getOffset(date)) * 60000; // diff for me comes to -4 hours Date keepDate = new Date(date.getTime() + diff); // Subtracting -4 hrs results in Mar13th Date doesnt take 2-3AM So keepDate in my case is Sat Mar 13 23:00:00 EST 2010 which in turn results in wrong date formatted I have looked into GWT 2.0 and found no change in the code for DateTimeFormat class. Can some one please tell me if he/she has noticed the same behavior and if it indeed is an issue. For the rest of the dates that I provide it seems to work fine. Thanks -- 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.
