I have a property in a bean like this:
The date I get instantiated in my bean looks like this:
<property name="dateOfBirth"><value>1994-04-22 00:00</value></property>
date = Fri Apr 22 00:00:00 GMT-01:00 1994
ie, it is being created in my own locale (BST).
I made my own CustomDateEditor, which is just like the one supplied with Spring, but it has a constructor like this:
Using this, the date in my bean looks like this:
dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
allowEmpty = false;
date = Thu Apr 21 23:00:00 GMT-01:00 1994
ie, an hour has been subtracted from the time, but the time zone remains the same.
I need dates in UTC, or GMT. I want my date to look like:
date = Fri Apr 22 00:00:00 GMT 1994
Can anyone help?