Java – Log displaying a wrong timezone

Software stack:

  • Application server: Oracle Weblogic v12.
  • Java: JDK1.8
  • ATG: 11.2

The log records that are printed in server.log file has the correct time and timezone printed as below

####<14-ago-2017 18H03' CLST> <Info> <JDBC> 

But the log records printed in server.out file doesn’t reflect the CLST timezone data, which is -0300, but still reflecting the daylight saving time of -0400

**** Error      lun ago 14 17:03:35 -04:00 2017 1502744855586

Tried to debug with the following steps:

The deployed web application (ATG commerce) prints different levels of log messages like Debug, Info, Error, etc., through atg.nucleus.logging.ApplicationLogging and atg.nucleus.logging.LogEvent classes.

And the timestamp used in the above classes are as follows:

mTimeStamp = System.currentTimeMillis();

A standalone java class to test the behavior gives the below result, the right time.

long millis = System.currentTimeMillis();
Date dat = new Date();

Mon Aug 14 18:03:40 CLST 2017

Also the system time of the linux box reflects the right time:

~]$ date

Mon Aug 14 18:03:58 CLST 2017

Need help in understanding how and from where the wrong time is picked up by the logs in .out file.

Additional information:
The JVM timezone data was updated few months back to reflect the updated data, tzdata2017b

The found in jre/lib has the following properties

handlers= java.util.logging.ConsoleHandler

# To also add the FileHandler, use the following line instead.
#handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
# setting to limit messages printed to the console.
.level= INFO

# default file output is in user's home directory.
java.util.logging.FileHandler.pattern = %h/java%u.log
java.util.logging.FileHandler.limit = 50000
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter

# Limit the message that are printed on the console to INFO and above.
java.util.logging.ConsoleHandler.level = INFO
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

The oracle weblogic /weblogic/ has the below properties configured.

#handlers=java.util.logging.ConsoleHandler, java.util.logging.FileHandler


com.bea.console.utils.MBeanUtils.level = DEBUG
com.bea.console.utils.MasterControlProgram.level = DEBUG
com.bea.console.utils.ConsoleMessagesBackingFile.level = DEBUG
com.bea.console.actions.messages.MessagesAction.level = DEBUG
com.bea.console.actions.BaseConsoleAction.level = DEBUG
com.bea.console.utils.MBeanChangeManager.level = DEBUG
org.apache.struts.level = WARN
org.apache.beehive.netui.pageflow.scoping.internal.level = ERROR
org.apache.beehive.netui.pageflow.internal.AdapterManager = FATAL

Java – Log displaying a wrong timezone