Date: October 19, 2026
Andrew:
i need to set the right time on DEv and Clone via NTP
Claude:
Run this as root on each of Dev and Clone:
service ntpd stop
ntpdate -u au.pool.ntp.org
hwclock --systohc
service ntpd start
chkconfig ntpd on
ntpdate steps the clock immediately, which ntpd alone won't do if the offset is large. hwclock --systohc writes the corrected time to the hardware clock, so it survives a reboot.
If ntpdate isn't found, install it with yum install ntp. On CentOS 6 that may need the vault repo, since the mirrors are gone. The same package provides ntpd.
Check afterwards with ntpq -p. A * in the first column means it has locked onto a server.
If the clocks are right but the timezone is wrong, fix that with ln -sf /usr/share/zoneinfo/Australia/Sydney /etc/localtime.
On VMs, a clock that keeps drifting often comes from the hypervisor's time sync fighting ntpd. If the time goes wrong again after a few hours, check the VM's time-sync setting on the host.
Andrew:
copy the chatlog to markdown