Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

tomcat time zone problem.

843835Aug 21 2002 — edited Oct 15 2002
Hi

My time zone is set as

root_juliet# echo $TZ
Australia/NSW

However, tomcat appears to want to use the EDT timezone;

from tomcat log;

root_juliet# 07:34:29 EDT - ContextManager: Adding context Ctx( /onsale )
07:34:29 EDT - ContextManager: Adding context Ctx( /examples )
Starting tomcat. Check logs/tomcat.log for error messages
07:34:29 EDT - ContextManager: Adding context Ctx( )
07:34:29 EDT - ContextManager: Adding context Ctx( /calendar )
07:34:29 EDT - ContextManager: Adding context Ctx( /old_admin )
07:34:29 EDT - ContextManager: Adding context Ctx( /test )
07:34:33 EDT - PoolTcpConnector: Starting HttpConnectionHandler on 8090
07:34:33 EDT - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007

I've tried explicitly setting the format in server.xml, but to no avail.

any Java bean or jsp using time via tomcat uses the EDT timezone, but if i run a java prog outside of tomcat, the correct AET timezone is used, so the problem appears to be limited to my tomcat configuration.

I can force the time zone inside my java beans;

TimeZone timeZone = TimeZone.getTimeZone("AET");
//cat.error("TimeZone="+timeZone.getID());

cal = Calendar.getInstance();
cal.setTimeZone(timeZone);

but this does not solve the problem whereby the log time stamp is wrong.

Can anyone help ?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 12 2002
Added on Aug 21 2002
2 comments
357 views