aspose file tools*
The moose likes Java in General and the fly likes AIX Timezone problem, Java showing one hour less    Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "AIX Timezone problem, Java showing one hour less    " Watch "AIX Timezone problem, Java showing one hour less    " New topic
Author

AIX Timezone problem, Java showing one hour less

Raghu Devatha
Ranch Hand

Joined: Feb 10, 2009
Posts: 39


The output of the program and the shell command 'Date' are differed by one hour, did anybody face this problem. What can be the solution.?




dR
Adam Michalik
Ranch Hand

Joined: Feb 18, 2008
Posts: 128
I've seen some announcements concerning updates in JRE/JDK timezones on Sun's site. Try to check with the newest version (possibly newest JDK 6 version).
Raghu Devatha
Ranch Hand

Joined: Feb 10, 2009
Posts: 39
Adam Michalik wrote:I've seen some announcements concerning updates in JRE/JDK timezones on Sun's site. Try to check with the newest version (possibly newest JDK 6 version).



Sorry, but I am using IBM Java
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29275
    
140

Raghu Devatha wrote:Sorry, but I am using IBM Java

What version? (or the JDK or more likely of WebSphere) When was it last patched?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18150
    
    8

Jeanne Boyarsky wrote:What version? (or the JDK or more likely of WebSphere) When was it last patched?


Looks to me like the answers to those questions were already in the original post:

Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29275
    
140

Doh! I guess my point was that it looks old and maybe there is a later version.
Nitesh Kant
Bartender

Joined: Feb 25, 2007
Posts: 1638

Not related to Performance. Moving to Java In General


apigee, a better way to API!
Mike Simmons
Ranch Hand

Joined: Mar 05, 2008
Posts: 2970
    
    9
Ragu, one thing is not clear from your post: between Java's output and the system "date" output, which one (if any) is actually correct? Is this a problem with Java, or a problem with how the date command is displaying the time?

I'm suspicious to see that $TZ is "IST-5:30IST" - that looks nonsensical to me. IST should be equivalent to GMT+5:30, not IST-5:30. What does that even mean? Maybe that just means that whoever came up with the TZ string value was a poor communicator, or maybe it indicates deeper technical issues.

I see discussion of a similar issue here. A good suggestion is to compare the output of "date" vs "date -u". If the difference is 5:30, good, but if it's 6:30, the problem is in your AIX system, not Java.
Raghu Devatha
Ranch Hand

Joined: Feb 10, 2009
Posts: 39
Mike, System 'date' is giving me the correct time. I thought it was a problem with Java.

I too suspect the way my TZ variable is set. The link you suggested was helpful. The news is date and date -u gives me a difference of 6.30, so , should be problem with my AIX machine. I will post the solution after I get

Thanks a lot for your help,

-Raghu
Raghu Devatha
Ranch Hand

Joined: Feb 10, 2009
Posts: 39
Daylight Savings Time option was enabled for IST but IST do not use any DST. Disabling the DST option and correcting TZ variable value helped.

Java and date are now showing the same time. 'date' and 'date -u' results in a 5.30hrs difference.

Thanks a lot Mike Simmons.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: AIX Timezone problem, Java showing one hour less
 
Similar Threads
Weblogic 9.2 server starup error : Error creating bean with name 'entityManagerFactor
Exception while starting the Adminserver
Websphere Stopping Issue
Help with IBM java version
Need the IBM JRE Version