9

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.

deltanovember
  • 42,611
  • 64
  • 162
  • 244

1 Answers1

19

java.util.TimeZone.setDefault() can be used to set a default time zone to be returned by getDefault().

MetroidFan2002
  • 29,217
  • 16
  • 62
  • 80