Another example: Initializtion with date = new Date() at 13 minutes after midnight. Date.toString() prints "Thu Dec 21 00:13:48 CET 2006", but the page shows "20.12.2006" and I got back "Wed Dec 20 01:00:00 CET 2006" after submit. So every date with time part less than one our is dated back one day. When I execute the same code after one o'clock in the morning, the date is calculated correct (but the time part is always set to one o'clock, where I expect zero).
Regards Helmut >Hello, > >I've got a tc:date in my page which represents a java.util.Date in >my bean. The Date is initialized with >Date date = (new GregorianCalendar(2006, 8, 1)).getTime(), so the >time part is 00:00:00. Date.toString() prints "Fri Sep 01 00:00:00 CEST 2006", >which is correct. But in the page, I see "31.08.2006" (with ><f:convertDateTime pattern="dd.MM.yyyy" />). When I submit the page, the >date is written back as "Thu Aug 31 02:00:00 CEST 2006", which is >definitely wrong. When I initialize the date with >date = (new GregorianCalendar(2006, 11, 1)).getTime(), I got back >"Thu Nov 30 01:00:00 CET 2006" from the page. So, the behaviour is >different, if the date lies in the daylight saving period or not, and >the day of month is always miscalculated by one day minus one or to hours. > >Maybe, the initialization of the date might be wrong or the converter >is not setup correctly. But I think, there's also a problem in the >converter. > >Regards >Helmut

