Java – change the time zone of Tomcat [copy]
•
Java
See English answers > change timezone in Tomcat 4
>When I use the java time pack to access the system default time zone, it is actually the time zone I get Is it the system clock setting? Or Tomcat settings. > Where can I set the time zone of Tomcat
Solution
>Tomcat uses the operating system time setting. > The best place is to set the environment variable in the Tomcat bin directory to setenv bat(setenv.sh). Using set Java for windows_ Opts = "– duser.timezone = GMT" or export Java for Linux_ OPTS =“ – Duser.timezone = GMT”. Also make sure Catalina SH contains the script that calls the setenv file It should exist by default
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码