?
Solved

Overriding JDK's Default Timezone definitions?

Posted on 2006-04-05
9
Medium Priority
?
923 Views
Last Modified: 2006-11-18
How can override the default Timezone Offets that come along with JDK 1.5?
Is there any property file that I can define?

User.timezone property can help to override but the change lives only during the program execution.
Is there any way to permanently define in a property file?



0
Comment
Question by:rkonka123
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 14

Expert Comment

by:StillUnAware
ID: 16385629
read this:

http://java.sun.com/docs/books/tutorial/essential/attributes/properties.html

Take a look at part Saving Properties
0
 

Author Comment

by:rkonka123
ID: 16385689
Is there any property file that JRE uses for loading timezone info during its startup ?


0
 
LVL 5

Accepted Solution

by:
mrigank earned 336 total points
ID: 16386049
Use java -Duser.timezone=UTC MyProgram

to define the timezone
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 14

Assisted Solution

by:StillUnAware
StillUnAware earned 332 total points
ID: 16386290
It looks like You can't set it permanently, only for the duration of a program run. Although You can try setting the system timezone to some other, and check whether that changes the timezone showed by java. If yes, then You'll know java reads the system settings itself.
0
 
LVL 92

Expert Comment

by:objects
ID: 16386549
I think it gets it from the system settings.
0
 

Author Comment

by:rkonka123
ID: 16386597
JRE comes with set of supported Timezone codes, i think more than 100 timezone codes and it uses some property file to load this info.

I want to override this file. So is there any way to do this ?










0
 
LVL 92

Assisted Solution

by:objects
objects earned 332 total points
ID: 16386630
C:\Program Files\Java\jre1.5.0_06\lib\tzmappings

am not aware of a properties file being involved
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month14 days, 10 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question