vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| We just moved to Java 1.5 and the latest depot of Apache/Tomcat, on HP-UX 11.11. Suddenly, none of my Java apps know what time it is. The Java apps are all operating in GMT, 7 hours off from MST (Mountain Standard Time-- Phoenix, AZ, USA). The system time is okay. # cat /etc/TIMEZONE TZ=MST7 export TZ # echo $TZ; date MST7 Fri Jan 21 09:20:58 MST 2005 This is correct, however, this Java code System.out.println(new java.util.Date()); prints Fri Jan 21 16:21:40 GMT 2005 Some JSP expressions executed in Tomcat (Servlet container): Date is <%= new java.util.Date() %> <br> TZ is <%= System.getenv( "TZ" ) %> <br> Date is Fri Jan 21 16:22:07 GMT 2005 TZ is MST7 [A couple of hours later...] I'm inclined to blame Java, especially because of this: # TZ=MST; export TZ; java TimeTest Fri Jan 21 11:46:16 MST 2005 Unfortunately... that breaks the system time: # echo $TZ; date MST Fri Jan 21 18:47:21 MST 2005 Is this happening to anyone else? Does anyone see anything I should change, or anything else to try? Thanks, -- Wendy |