Reputation: 44051
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.
Upvotes: 9
Views: 7337
Reputation: 29878
java.util.TimeZone.setDefault()
can be used to set a default time zone to be returned by getDefault()
.
Upvotes: 20