Why are my Apache Tomcat Log Time Stamps out of sync with my other systems / applications?
search cancel

Why are my Apache Tomcat Log Time Stamps out of sync with my other systems / applications?

book

Article ID: 13420

calendar_today

Updated On:

Products

Output Management Document Viewer Output Management Web Viewer

Issue/Introduction

In the process of debugging some problems, CA Support may have you looking at several different logs on your system - some from Web Viewer (application logs), some from DRAS and/or CCI, and others from your Web Application Server (WAS), either Apache Tomcat or IBM WebSphere. If using Tomcat, you may notice the time marked for a specific event in a Tomcat log may be off several hours from the same event in all of the other application and task logs. 



Why are my Apache Tomcat Log Time Stamps out of sync with those of my other tasks / systems / applications?

Environment

all

Resolution

This is due to Java defaulting to Greenwich Mean Time (GMT).  For example, Tomcat running on US Eastern Time (EST) will be logged in Tomcat with time stamps five hours later than local time (to the server).

Additional Information

You can over-ride this Java setting -Duser.timezone=VALUE

For example, for US East coast...

 

-Duser.timezone=America/New_York

More specifically, update the Tomcat task (mainframe) adding this record. We suggest after the -Dfile.encoding= record.

 

 IJO="$IJO -Duser.timezone=America/New_York"

 

For US West coast, use value "America/Los_Angeles".

 

For Tomcat started via other methods (Service or SH script), just look for wherever you set the JVM values such as the memory settings.