Help ... Java not reading correct AIX system time.


 
Thread Tools Search this Thread
Operating Systems AIX Help ... Java not reading correct AIX system time.
# 1  
Old 09-21-2006
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  
Old 09-21-2006
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  
Old 09-21-2006
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
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Is it possible to set up a portable Java in AIX operating system

Hi there, I would like to check if it is possible use a portable jre in unix operating system. I check in Windows there is Portable JRE. However as I don't wish to install in client machine I will need to use a temporary JRE to setup in the operating system. (1 Reply)
Discussion started by: alvinoo
1 Replies

2. AIX

Unable to correct NMONVisualizer java error. Can someone help to decode this java error?

Hello AIX and Java gurus, I have a java error that I have no clue how to resolve. I am trying to run the popular NMONVisualizer utility against a NMON dataset and getting the error as shown below: /db2storage/NMON >java -jar NMONVisualizer_2015-02-02.jar com.ibm.nmon.ReportGenerator... (1 Reply)
Discussion started by: okonita
1 Replies

3. Programming

Excel reading on Linux using Java

Hi, I have a requirement where users will send excel(.xls) file to Linux Platform using ftp/sftp. After that the excel file needs to be read using java on linux and converted into csv. I am using jxl to parse the excel, but few character like £ are not getting parsed properly. If i open the... (0 Replies)
Discussion started by: joy_bt
0 Replies

4. Linux

Process start time not showing correct time

Process start time is not showing the correct time: I had started a process on Jun 17th at 23:30:00. Next day morning when I run the command "ps -ef | grep mq", the process is showing the start date of Jun 17th but the start time is 00:16:41 Day/Date is setup correctly on the server. It... (2 Replies)
Discussion started by: hemangjani
2 Replies

5. UNIX for Dummies Questions & Answers

Correct time in server

Hi, we have a server which when we check time it has different time for different user. When we're using root user, the time is correct but when we login as individual user the time is delayed 1 hour. How can we correct the time when we're using individual user like my own user? Please help me to... (4 Replies)
Discussion started by: ayhanne
4 Replies

6. Linux

how to get the correct reading of diskspace

What has happened. I beleive the diskpace is not showing the correct reading. Is there another command to use to get the diskspace without using du -h? Is there another command linux uses. The reason i am assuing this i cleared the log of a process that started using nohup for... (5 Replies)
Discussion started by: jonathan184
5 Replies

7. AIX

Sync AIX system time with Windows Domain Controller

Yeah so, I have setup a domain controller (windows 2003) active directory machine and it is managing couple of windows servers and workstation. I also have couple of AIX machines that need to have the same time as other windows server and workstation hanging off of that domain controller. Now... (1 Reply)
Discussion started by: murderfly
1 Replies
Login or Register to Ask a Question