The moose likes Linux / UNIX and the fly likes set JVM timezone in Linux Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Reply Bookmark "set JVM timezone in Linux" Watch "set JVM timezone in Linux" New topic
Author

set JVM timezone in Linux

shital sonavane
Greenhorn

Joined: Jan 28, 2011
Posts: 19

How to change JVM's timezone in CentOS.
Please guide me.
Thanks in advacne.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 12513

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.


One of the most odious afflictions that Business has inflicted on the modern English language is "pro-active". Most of the time it's simply redundantly used in place of the simple old word "active". And a good deal of the rest of the time it means "You're not overworked enough yet, so go out and find more!"
 
IntelliJ Java IDE
 
subject: set JVM timezone in Linux
 
Threads others viewed
Timestamp advanced 4 hours
Setting default timezone for Application
<f:convertDateTime Problem
Calendar 1st day of week changes?
day light saving
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture