You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by per j <pe...@hotmail.com> on 2003/04/18 01:22:09 UTC

Help. How to fix timezone problem in Tomcat?

I have a problem with the timezones with Tomcat and probably JVM related.  
Tomcat's log entries have dates at GMT+5 (localhost_log), GMT+5 
(catalina.out) and GMT+5 (localhost_admin_log).

My computer clock is GMT-5.

/etc/sysconfig/clock
ZONE="Etc/GMT-5"
UTC=true
ARC=false

When I run `date`
Thu Apr 17 19:11:02 EDT 2003

My hardware clock is UTC.
When I run `hwclock --utc --show`
Thu 17 Apr 2003 07:12:35 PM EDT  -0.432850 seconds

When I run `date -u`
Thu Apr 17 23:15:25 UTC 2003

I'm also running ntpd
# ntpq -p
     remote           refid      st t when poll reach   delay   offset  
jitter
==============================================================================
#fsa.cpsc.ucalga montpelier.ilan  2 u  713 1024  377   50.879   -3.424   
0.378
#wxo-svr1.cmc.ec gps-ntp-clock.c  2 u  328 1024  377   71.341   14.461  
15.209
#wxo-svr2.cmc.ec clock.uregina.c  2 u  401 1024  377   49.635   13.576  
14.995
-time1.chu.nrc.c tic.chu.nrc.ca   2 u  419 1024  377   50.561    3.223   
3.965
.
.
.

Also all my JSP applications think they are in GMT+5.

What should I do?  Where do I go to fix this?

Should I need to configure Tomcat to load the JVM so that the JVM will 
always report GMT-5?

Also need to fix Tomcat to report UTC in the date of the log entires if 
possible.

_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org