Feb 8th, 2010, 08:56 PM
Spring Batch Admin displays incorrect Dates
Spring batch admin is currently displaying all dates 10 hours earlier than they actuallly are. My timezone is GMT +10 which would explain why this is happening; Spring Batch Admin is display the times in GMT. How can I stop this from happening? The times in the actual database are displaying correctly when selected.
Feb 9th, 2010, 03:58 AM
That depends on your point of view I suppose. Batch Admin just uses SimpleDateFormat to format the times, and that is a bit of a can of worms. I would have expected it to pick up the default timezone from your locale - is your JVM or OS set up in GMT? If you care deeply open a JIRA (http://jira.springframework.org/browse/BATCHADM).
Originally Posted by afryer
Feb 9th, 2010, 05:35 PM
Think I found the cause
The timezone is hardcoded in the org.springframework.batch.admin.web.JobExecutionCo ntroller class.
In this class you see the following hardcoding of timezone to GMT all over the place...
model.addAttribute(new JobExecutionInfo(jobExecution, TimeZone.getTimeZone("GMT")));
Feb 11th, 2010, 11:27 PM
date display in GMT only