1834101 Members
2678 Online
110063 Solutions
New Discussion

change time on systems

 
SOLVED
Go to solution
Musa I. S.
Frequent Advisor

change time on systems

How do i go about changing the time on some of my HPUX servers.

8 REPLIES 8
Court Campbell
Honored Contributor

Re: change time on systems

use the date command.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Court Campbell
Honored Contributor

Re: change time on systems

And you could also use sam.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
James R. Ferguson
Acclaimed Contributor
Solution

Re: change time on systems

Hi:

To reset the time on your server, do:

# date [-u] [mmddhhmm]

The '-u' means specify the mmddhhmm in UTC time.

This will step your date/time forward or backward in *one* change. If you are moving backwards in time, stop time-sensitive processes like databases and the 'cron' daemon. Going forward is generally benign.

See the 'date' manpages.

Regards!

...JRF...
TTr
Honored Contributor

Re: change time on systems

Consider using the "date -a ..." option if you are going to set the time back. It skews the clock similar to "ntptime -B" and you don't have to worry about time sensitive applications.
Sajjad Sahir
Honored Contributor

Re: change time on systems

Dear

u can use date command

see man date

sajjad
James R. Ferguson
Acclaimed Contributor

Re: change time on systems

Hi (again):

I agree with TTr with regard to setting the time backwards using 'date -a'. This is fine for relatively small decrements if you care to wait long enough for the slew.

You should always setup NTP (network Time Protocol) to eliminate problems like this in the first place. This can be done via SAM or via simple configuration setup:

http://docs.hp.com/en/B2355-90774/ch04.html

Setup at least three reliable, external time sources:

http://www.ntp.org/

Regards!

...JRF...
Musa I. S.
Frequent Advisor

Re: change time on systems

Thank you folks. you all are the best.
Dennis Handly
Acclaimed Contributor

Re: change time on systems

Make sure you have the correct timezone. You may have the correct UTC time but the wrong zone.
Right now I get for UTC:
$ date -u
Tue Jun 17 20:04:53 UTC 2008