Correct time in server


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Correct time in server
# 1  
Old 02-10-2009
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 correct it. Thanks!

Time using root user:
root :Notif2 # date
Tuesday February 10 16:28:17 CET 2009

Time using my user:
bash-2.03$ date
Tuesday February 10 15:32:18 Africa/Algiers 2009
# 2  
Old 02-10-2009
I dont think you have any time problem, you are being fooled by your time zone settings...
looks like root is set UTC -CET and users to local time zone (but not sure, where are you??)
To answer your question, there is a timezone variable called TZ, that is what you need to set properly...


All the best
# 3  
Old 02-10-2009
Correct time in server

Hi Vbe,

Thanks! I'm in Algiers. How can I correct the timezone settings for the individual users? As only root user has the correct time. Sorry I'm new to unix that's why I don't know how I can correct it.
# 4  
Old 02-10-2009
What OS is it?
on HP-UX:
ant:/home/vbe $ date
Tue Feb 10 18:01:00 MET 2009
ant:/home/vbe $ echo $TZ
MET-1METDST
ant:/home/vbe $ TZ=CET
ant:/home/vbe $ date
Tue Feb 10 17:01:13 CET 2009
ant:/home/vbe $

As you can see how I set TZ to CET, if that is what you want , just add it in your .profile...
(My timezone is for Switzerland, France...)


All the best
# 5  
Old 02-10-2009
Quote:
I'm in Algiers. How can I correct the timezone settings for the individual users? As only root user has the correct time.
If you are in Algiers, wouldn't you want to use the correct timezone?
Code:
Time using my user:
bash-2.03$ date
Tuesday February 10 15:32:18 Africa/Algiers 2009

This suggests that your server time is wrong by one hour - and you have been using the wrong time zone for root...
Code:
Time using root user:
root :Notif2 # date
Tuesday February 10 16:28:17 CET 2009

Perhaps setting root to use the correct timezone, then setting it to the correct time would resolve both issues?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to preserve time stamp while copying a directory from Server B to Server A?

Experts, Please help me out here. How to preserve time stamp while copying a directory from Server B to Server A (3 Replies)
Discussion started by: ahmed.vaghar
3 Replies

2. Shell Programming and Scripting

How to get the correct IP on a Linux server?

Hi I need to get IP address from linux server. There are many script to do this, but no one is perfect. They just grab eth0 or eth1 from ifconfig, and this may, may not be correct. You may have several IF configured, but only one is default GW Here is how I would like the process to be.... (8 Replies)
Discussion started by: Jotne
8 Replies

3. Solaris

modifying date and time and time zone on solaris 5.10 with (redundant server) veritas

I have a cluster of two Solaris server (veritas cluster). one working and the other is standby I am going to change the date on them , and am looking for a secure solution as it is giving an important service. my opinion is that the active one doesn't need to be restarted (if I don't change the... (1 Reply)
Discussion started by: barry1946
1 Replies

4. HP-UX

How to rename file in FP server with server time stamp?

Hello All, I am new user in this forum. Facing problem when trying to download file using Perl ::NET:FTP module. I need to rename the remote server file with latest timestamp of that ftp server. Can somebody help me if this is possible? Many thanks, (5 Replies)
Discussion started by: krsnadasa
5 Replies

5. AIX

Time Zone for a User Different From Server Time

Hi, A server runs on EDT. Can I set a user with time-zone GMT without changing the server time? regards, Roshni (1 Reply)
Discussion started by: RoshniMehta
1 Replies

6. 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

7. UNIX for Advanced & Expert Users

How To Provide Time Sync Using Nts-150 Time Server On Unix Network?

can anybody tel lme,how to instal NTS -150 on a unix network,it needs some patch to fetch time frm serve,,?? (2 Replies)
Discussion started by: pesty
2 Replies

8. AIX

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... (2 Replies)
Discussion started by: dave521
2 Replies
Login or Register to Ask a Question