Operating System - HP-UX
1834188 Members
2868 Online
110064 Solutions
New Discussion

How to change system time

 
Ezhilarasan
Occasional Advisor

How to change system time

Hi,

We found that our HP-UX m/c time is 5 minutes faster than actual time.
How can we set time properly.
Can we use date command or sam to change time ?
Do we have to reboot the m/c !
Kindly give me command and steps.

Thanks
R.Ezhil

6 REPLIES 6
monasingh_1
Trusted Contributor

Re: How to change system time

You can set the time by sam or by just date command. Do man on date if you want to use date to set time.

Also , search on internet for time servers and then use one of them as your time server if you do not have any time server configured in your network.

time server can be configured from SAM.

hope this helps..
Armin Feller
Honored Contributor

Re: How to change system time

please see man date:

# date [-u] mmddhhmm[yy]

or use set_parms command if there is more wrong as the delay of 5 minutes:

# set_parms date_time

regards ...
Armin
monasingh_1
Trusted Contributor

Re: How to change system time

Generally one of the routers are set as time server on in the network, so talk to network people , they may already have a time server configured, in that case just use that as the time server.
Use SAM to configure the time server and also edit the /etc/rc.config.d/netdaemon file and give the time server name:
NTPDATE_server=IP_OF_TIME_SERVER
and
XNTPD=1

This way when you boot the server next time it will synchronize the time with time server.

hope this helps..
Yogeeraj_1
Honored Contributor

Re: How to change system time

hi,

i prefer to use:
set_parms date_time

it is recommended that you shutdown all your applications especially that you will be going back in time.

i would do it in single user mode and restart the server after the change.

hth
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
John Palmer
Honored Contributor

Re: How to change system time

Provided you're on HP-UX 11, you can drift the time slowly without affecting any application by using the 'date -a' command.

In your case, 5 minutes fast is 300 seconds so simply run date -a -300.

Regards,
John
Ian Lochray
Respected Contributor

Re: How to change system time

As Yogeeraj says, you should shut down all applications and, if possible, do it in single user mode. Applications like Oracle can get very upset if you start changing the date, particularly if you move the date backwards.