0

I have installed the server wildfly 9 on Centos 7 and the time which is registered in server.log is one hour before. The timezone of Centos 7 is Europe/Athens (GMT +03:00) but the time in server.log is registered with timezone GMT +02:00.

Can anyone help me with this issue so that the time in server.log will be in timezone +03:00?

  • 1
    Have you looked at this? - https://stackoverflow.com/questions/50129116/wildfly-timezone-with-jpa or start with specific timezone: TimeZone.setDefault(TimeZone.getTimeZone("UTC")); – confused Aug 26 '21 at 16:29

1 Answers1

0

You'll need to set the time zone for the date in the PATTERN formatter. The %z{ZONE_ID} is the pattern. An example in CLI would be:

/subsystem=logging/pattern-formatter=PATTERN:write-attribute(name=pattern, value="%z{Europe/Athens}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n")

Note that the time zone pattern needs to be placed before the date pattern.

James R. Perkins
  • 16,800
  • 44
  • 60