A date (as the Date temporal type) is stored in my DB like this: 31.10.2012
When I display it in the UI, it is rendered like this per default: 2012-10-31
I convert it using <f:convertDateTime pattern="dd.MM.yyyy" />
and unexpectedly it turns to 30.10.2012
The SimpleDateconverter
, fed with the same date and the same format string returns 31.10.2012
, as expected.
What am I missing?
Thank you
EDIT : for dates stored as Timestamp
the same conversion yields correct results, so I suppose it has something to do with the Date
interpreted as the exact midnight which in turn might be interpreted to belong to 2 different days. But I still have no clue where to define the behaviour and what would be the best workaround.