java.util.date

Dandymorganl

New Member
when I startup tomcat , open a Jsp page with \[code\]new java.util.date()\[/code\]at the beginning , date is correct ,like it\[code\]date : Fri Mar 29 19:06:07 GMT 2013\[/code\]soon it changed to another value without timezone .\[code\]date : Fri Mar 29 11:06:07 GMT 2013\[/code\]My server is linux centos6.4 , tomcat version is 7 ,jdk1.6 ,and server clock config is:
R4dOa.jpg
I modified my tomcat catalina.sh , add user zone :\[code\]JAVA_OPTS="$JAVA_OPTS $LOGGING_MANAGER -Duser.timezone=GMT+08"\[/code\]I doubt maybe my application has some bug , but what bugs can make \[code\]date\[/code\] changes. I spent hours in this question and not resolved. any help will be greately appreciate.
 
Back
Top