java 如何在 jboss7.1.1 服务器中将 jboss 时区 IST(Asia/Calcutta) 更改为 EST(America/New_York)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26036178/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how to change jboss time zone IST(Asia/Calcutta) to EST(America/New_York) in jboss7.1.1 server
提问by nmkkannan
I am using jboss 7.1.1.I want to change time zone IST(India) to EST(New_York).I got one solution for using java_opts option.I put this below code in domain.conf file in bin folder.
我正在使用 jboss 7.1.1。我想将时区 IST(印度)更改为 EST(New_York)。我得到了一种使用 java_opts 选项的解决方案。我将以下代码放在 bin 文件夹中的 domain.conf 文件中。
JAVA_OPTS="-Duser.timezone=America/New_York"
After restart jboss server and goto check user.timezone = Asia/Calcutta in boot.log file in log folder.
重新启动 jboss 服务器并在日志文件夹中的 boot.log 文件中检查 user.timezone = Asia/Calcutta。
It's did not change.I want to change time zone Asia/Calcutta to America/New_York.
它没有改变。我想将时区亚洲/加尔各答更改为美洲/纽约。
I do not know how to set custom timezone in jboss, help needed
我不知道如何在 jboss 中设置自定义时区,需要帮助
采纳答案by pappu_kutty
I think you are running in standalone mode so you can add -Duser.timezone="America/New York"
to JBoss installation/bin/standalone.conf.bat
file to JVM options which already present in the file.
我认为您在独立模式下运行,因此您可以将文件添加-Duser.timezone="America/New York"
到JBoss installation/bin/standalone.conf.bat
文件中已经存在的 JVM 选项中。
domain mode is nothing but many instances of jboss are running and your configuration will for this alone.
域模式只不过是许多 jboss 实例正在运行,您的配置将仅用于此。
回答by Malan
echo "export JAVA_OPTS=\"$JAVA_OPTS -Duser.timezone=Africa/Johannesburg\"" >> /opt/wildfly/bin/standalone.conf
Restart and Done
重新启动并完成