A JEE6/JSF 2.0/JPA 2.0 application running on JBoss 6 M5.
The converter works fine, however when I save the entity to a database (MySQL) and load it again, one month has been miraculously substracted from the date
e.g 05/10 -> 04/10. The date in the database is correct (2010-05-01).
Of course when I save again, the date in the database will be wrong.
Okie looks like this is the problem ----
Basically, for JSFDateTimeConverter Javadoc states that if the timeZone attribute is not specified, then the default is GMT.
But when you create an instance of java.text.SimpleDateFormat, the default TimeZone is equal to TimeZone.getDefault() which in your case might not be GMT and thats the reason of the offset.
The only way I can think of this is probably the date comes back as 2010-05-01 with time defaulted to 00:00:00 hours. Now since CET runs behind GMT, it is still 2010-04-30. Probably, That is why the month offset.