The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > AIX
Google UNIX.COM


AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Multi-Thread Run-time Analysis Tool for Java iBot UNIX and Linux RSS News 0 03-11-2008 06:50 PM
Using Subversion, NetBeans IDE, and Sun Java System Web Server With Java ME iBot UNIX and Linux RSS News 0 02-01-2008 02:00 PM
R-179: Sun Java System Web Server Vulnerability iBot Security Advisories (RSS) 0 12-24-2007 06:40 AM
Reading one line at a time danielsf Shell Programming and Scripting 4 10-11-2006 11:33 PM
Reading a file one line at a time app4dxh UNIX for Dummies Questions & Answers 4 07-25-2002 05:39 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 09-21-2006
Registered User
 

Join Date: Sep 2006
Posts: 7
Help ... Java not reading correct AIX system time.

I have Java 1.4.2 (IBM AIX build ca142-20050929a SR3) installed on AIX 5.3.

My system time is set correctly and both date and smitty confirm the correct date, time, and timezone:

#date
Thu Sep 21 15:12:42 EDT 2006

However, when I check the sytem time in Java (Date(System.currentTimeMillis())), I get:
Thu Sep 21 10:12:42 GMT-05:00 2006

It looks like Java is reading the system time as the GMT time and then subtracting 5 hours to get to EDT; however I went through smitty and confirmed that my system time and timezone are both set correctly.

Any ideas?
Reply With Quote
Forum Sponsor
  #2  
Old 09-21-2006
Registered User
 

Join Date: Sep 2006
Posts: 7
Also from my /etc/environment file:

TZ=EST5EDT0,M3.5.0/2:00:00,M10.5.0/2:00:00

This all appears to be correct
Reply With Quote
  #3  
Old 09-21-2006
Registered User
 

Join Date: Sep 2006
Posts: 7
d'oh

Found the problem ...

The TZ variable was wrong, it should have been:
TZ=EST5EDT4,M3.5.0/2:00:00,M10.5.0/2:00:00
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 06:35 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0