在 Tomcat 中更改时区 [英] Change Timezone in Tomcat
本文介绍了在 Tomcat 中更改时区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何更改 Tomcat 中的时区?其中一个 web 应用程序 (Solr) 使用的时区不正确(与 MySQL 时间戳相比),我认为更改 Tomcat 的时区会有所帮助.谢谢!
How can I change the timezone in Tomcat? The timezone used by one of the webapps (Solr) is not right (compared to MySQL timestamps), and I think changing Tomcat's timezone will help. Thanks!
推荐答案
除非 tomcat 有个人 TZ 环境变量,否则它使用 /etc/localtime
在我的系统上是 /usr/share/zoneinfo/America/New_York
.
Unless tomcat has a personal TZ environment variable, then it uses /etc/localtime
which on my system is a copy of /usr/share/zoneinfo/America/New_York
.
Tomcat 的个人时区将在其启动脚本中以如下形式指定:
Tomcat's personal timezone would be specified in its startup script in a form like:
-Duser.timezone=GMT
这篇关于在 Tomcat 中更改时区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文