This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes set JVM timezone in Linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "set JVM timezone in Linux" Watch "set JVM timezone in Linux" New topic

set JVM timezone in Linux

shital sonavane

Joined: Jan 28, 2011
Posts: 20

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

Joined: Jun 25, 2001
Posts: 17282

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.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: set JVM timezone in Linux
It's not a secret anymore!