Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

set JVM timezone in Linux

 
shital sonavane
Greenhorn
Posts: 20
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to change JVM's timezone in CentOS.
Please guide me.
Thanks in advacne.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18156
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Normally the timezone will be taken from the OS. I typically have my hardware set to UTC/GMT and then the actual system time set to my local timezone, and I do all that using the standard OS timezone configuring utilities (actually I usually set it as part of the OS installation process and never touch it again).

I thing that if you set the environment variable "TZ" to the appropriate value, the JVM running in that particular shell environment will use it without actually having to change the OS timezone setting. There's probably also a JVM "-D=" property you can set, but I've never looked.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic