Set the time zone manually if not already set
Linux uses the file /etc/localtime to determine the time zone. This file should be either a copy of the appropriate timezone file from the directory /usr/share/zoneinfo or a symbolic link. If your time zone is incorrect, create a symbolic link to the appropriate timezone file.
# ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtimeSet whether hwclock uses local time or UTC
Edit the file /etc/sysconfig/clock and change “UTC=” to true or false. If you have a dual-boot system with Windows, using UTC may cause problems for Windows.
Set the system clock
# date MMDDhhmmCCYY.sswhere MM is month, DD is day, hh is hour, mm is minutes, CCYY is year and ss is seconds. Time should be in 24-hour notation.
To only set the time:
# date -s hh:mm:ssSet the hardware clock
To set the hardware clock to the current system clock:
# setclockthis method looks at /etc/sysconfig/clock to determine whether the hardware clock is set to UTC
Another method:
# hwclock –systohc# hwclock –systohc –utcuse the second option if you use UTC.
Set hwclock manually:
# hwclock –set –date=”9/22/96 16:45:05″
Everytime you use the hwclock –set command, it will create or edit the file /etc/adjtime to determine the systematic drift. Once you have some history, you can use the –adjust option to adjust the hardware clock appropriately. Run as a cron job if you want the clock to adjust automatically on a regular schedule. Don’t use the –adjust function when using ntpd since ntpd will turn the “11 minute mode” on, which is best left alone. See the hwclock manpage for more info.
Setup ntpd for automatic synchronization with a remote server
Run Red Hat’s setup utility to make ntpd start on boot up and edit /etc/ntp.conf
Set server and fudge options:
server time.nist.govfudge time.nist.gov stratum 10Enable multicastclient:
multicastclient # listen on default 224.0.1.1Edit /etc/sysconfig/ntpd if necessary. The default should be fine.
Start the ntpd daemonSet the time zone manually if not already set.
Linux uses the file /etc/localtime to determine the time zone. This file should be either a copy of the appropriate timezone file from the directory /usr/share/zoneinfo or a symbolic link. If your time zone is incorrect, create a symbolic link to the appropriate timezone file.
# ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtimeSet whether hwclock uses local time or UTC
Edit the file /etc/sysconfig/clock and change “UTC=” to true or false. If you have a dual-boot system with Windows, using UTC may cause problems for Windows.
Set the system clock
# date MMDDhhmmCCYY.sswhere MM is month, DD is day, hh is hour, mm is minutes, CCYY is year and ss is seconds. Time should be in 24-hour notation.
To only set the time:
# date -s hh:mm:ssSet the hardware clock
To set the hardware clock to the current system clock:
# setclockthis method looks at /etc/sysconfig/clock to determine whether the hardware clock is set to UTC
Another method:
# hwclock –systohc# hwclock –systohc –utcuse the second option if you use UTC.
Set hwclock manually:
# hwclock –set –date=”9/22/96 16:45:05″Everytime you use the hwclock –set command, it will create or edit the file /etc/adjtime to determine the systematic drift. Once you have some history, you can use the –adjust option to adjust the hardware clock appropriately. Run as a cron job if you want the clock to adjust automatically on a regular schedule. Don’t use the –adjust function when using ntpd since ntpd will turn the “11 minute mode” on, which is best left alone. See the hwclock manpage for more info.
Setup ntpd for automatic synchronization with a remote server.
Run Red Hat’s setup utility to make ntpd start on boot up and edit /etc/ntp.conf
Set server and fudge options:
server time.nist.govfudge time.nist.gov stratum 10Enable multicastclient:
multicastclient # listen on default 224.0.1.1Edit /etc/sysconfig/ntpd if necessary. The default should be fine.
Start the ntpd daemon
# service ntpd start