You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by David Rickard <Da...@GTSCompanies.com> on 2004/08/06 19:28:24 UTC

System Clock Issues with Webapps

Server: SunOS 5.9 Generic_112233-07 sun4u sparc SUNW,Ultra-250
Apache: 2.0.47
Tomcat: 4.1.29

Our server is used by divisions in multiple timezones, so the system clock 
is set to UTC to simplify log writing etc;
Each system user--including root--has a profile which masks the system 
clock to the appropriate time zone; root is masked to US-Pacific, the 
physical location of the server (confirmed by running "date" as root).
Apache and Tomcat run as root processes and should use root's profile; 
however, they sometimes "bypass" the profile and report UTC date/time value 
(evidenced by outputting the value of a java.util.Date in a JSP).
Doing an Apache/Tomcat restart will correct this system--so that our time 
JSP reports US-Pacific time as expected; however, Apache/Tomcat will revert 
(usually in less than a day) to reporting UTC time.
Any ideas on why this is happening? and how we can correct it?


--

David Rickard
Software Engineer
The GTS Companies
A TechBooks Company

---------------------------------------------------------------------------------- 

The GTS Companies:
GTS Publishing Services, GTS Graphics, GTS Innova:
Your Single-Source Solution!
Los Angeles CA  *  York, PA  *  Boston MA  *  New Delhi, India
---------------------------------------------------------------------------------- 



David.Rickard@GTSCompanies.com
Visit us on the World Wide Web
http://www.gtscompanies.com
5650 Jillson St., Los Angeles, CA 90040
(323) 888-8889 x331
(323) 888-1849 [fax]


Re: System Clock Issues with Webapps

Posted by Tim Funk <fu...@joedog.org>.
Use the JAVA_OPTS option on startup to set the timezone property.

-Tim


David Rickard wrote:
> Server: SunOS 5.9 Generic_112233-07 sun4u sparc SUNW,Ultra-250
> Apache: 2.0.47
> Tomcat: 4.1.29
> 
> Our server is used by divisions in multiple timezones, so the system 
> clock is set to UTC to simplify log writing etc;
> Each system user--including root--has a profile which masks the system 
> clock to the appropriate time zone; root is masked to US-Pacific, the 
> physical location of the server (confirmed by running "date" as root).
> Apache and Tomcat run as root processes and should use root's profile; 
> however, they sometimes "bypass" the profile and report UTC date/time 
> value (evidenced by outputting the value of a java.util.Date in a JSP).
> Doing an Apache/Tomcat restart will correct this system--so that our 
> time JSP reports US-Pacific time as expected; however, Apache/Tomcat 
> will revert (usually in less than a day) to reporting UTC time.
> Any ideas on why this is happening? and how we can correct it?
> 


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