The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > 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 09: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 05:00 PM
R-179: Sun Java System Web Server Vulnerability iBot Security Advisories (RSS) 0 12-24-2007 09:40 AM
Reading one line at a time danielsf Shell Programming and Scripting 4 10-12-2006 03:33 AM
Reading a file one line at a time app4dxh UNIX for Dummies Questions & Answers 4 07-25-2002 09:39 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-21-2006
dave521 dave521 is offline
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?
  #2 (permalink)  
Old 09-21-2006
dave521 dave521 is offline
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
  #3 (permalink)  
Old 09-21-2006
dave521 dave521 is offline
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
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:25 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0