如何以编程方式在 Java 中设置时区?
问题描述:
我知道我可以按如下方式提供 VM 参数
I know I can feed VM arguments as follows
-Duser.timezone="Australia/Sydney"
有没有程序化的方式来做等效的事情?我希望将设置应用于整个虚拟机.
Is there a programmatic way to do the equivalent? I would like the setting to be applied across the entire virtual machine.