[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Re: how to change date of system



You can consider these aproaches depends of the situation:

1-  Synch. your system with a reliable NTP server and change the hardware clock. This is what I do in my home's system.
# rdate time.mit.edu && hwclock --systohc 

2- Install openntpd and run the an ntp client as a daemon. This is what I do in my servers at work.
NTP, the Network Time Protocol, is used to keep the computer clocks synchronized. It provides the ability to sync the local clock to remote NTP servers and can act as NTP server itself, redistributing the local clock.

3- Add a line in the crontab which synchronizes the time hourly:
# crontan -e
0 * * * *  /usr/sbin/ntpdate -s time.mit.edu

ntpdate is a simple NTP client that sets a system's clock to match  the time obtained by communicating with one or more NTP servers.  It  is not sufficient, however, for maintaining an accurate clock in the long run.  ntpdate by itself is useful for occasionally setting the time on machines that do not have full-time network access, such as laptops.


Reply to: