[ajug-members] Tomcat Timezone
Christopher Fowler
cfowler at outpostsentinel.com
Sun Jul 30 15:17:41 EDT 2006
Hello,
I configured one of my servers for Central time and restarted it. When
I logged into the web application all dates in the DB were being stored
at CDT+1. I tested MySQL with now() and I found out that the
application was setting the date explicitly via:
Timestamp timestamp = new java.sql.Timestamp(
System.currentTimeMillis() );
For some odd reason Java was still in EDT. I fixed with this command:
env TZ=US/Central /etc/rc.d/init.d/tomcat restart
My question is why did changing /etc/localtime on the server and
restarting not put Java into CDT? Is there something I need to turn on?
Thanks,
Chris
More information about the ajug-members
mailing list