Results 1 to 4 of 4

Thread: Spring Batch Admin displays incorrect Dates

  1. #1
    Join Date
    Feb 2010
    Posts
    6

    Default 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.

  2. #2
    Join Date
    Jun 2005
    Posts
    4,232

    Default

    Quote Originally Posted by afryer View Post
    Spring batch admin is currently displaying all dates 10 hours earlier than they actuallly are.
    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).

  3. #3
    Join Date
    Feb 2010
    Posts
    6

    Default 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")));

  4. #4
    Join Date
    Feb 2010
    Posts
    6

    Default date display in GMT only


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •