VPS Time Not Correct with Time Server

Server Maintenance | Updated March 2026

When a VPS or dedicated server's system clock drifts out of sync, it can cause SSL certificate validation failures, cron job timing issues, log timestamp mismatches, and database replication problems. This guide covers how to diagnose and fix time synchronization issues on CentOS/CloudLinux servers.

Quick Fix

On most servers, the fastest fix is: chronyc makestep to force an immediate sync, then verify with chronyc tracking. If chrony isn't installed, install it with yum install chrony -y && systemctl enable --now chronyd.

01. Checking the Current Time

First, verify how far off the clock is:

# Show current system time and timezone
date

# Show hardware clock (RTC)
hwclock --show

# Compare to NTP servers
chronyc tracking

If chronyc tracking shows a large "System time" offset (more than a few seconds), the clock has drifted significantly. The "Last offset" value shows the correction applied on the most recent sync.

02. NTP vs Chrony

CentOS 7 and CloudLinux 7+ use chrony as the default NTP implementation. The older ntpd service is still available but chrony is preferred because it syncs faster after boot, handles intermittent network connectivity better, and uses less memory.

Check which is running:

# Check chrony
systemctl status chronyd

# Check ntpd
systemctl status ntpd
Important

Do not run both chronyd and ntpd at the same time. They will conflict. If you're switching from ntpd to chrony, disable ntpd first: systemctl disable --now ntpd

03. Setting Up Chrony

# Install chrony if not present
yum install chrony -y

# Enable and start
systemctl enable chronyd
systemctl start chronyd

# Verify it's syncing
chronyc sources -v

The default configuration at /etc/chrony.conf uses CentOS pool servers. The output of chronyc sources shows each NTP source with a status indicator:

^* - Currently selected best source (this is what you want to see)

^+ - Acceptable source, could be selected as backup

^- - Source is reachable but not good enough to use

^? - Source is unreachable or hasn't responded yet

If all sources show ^?, the server can't reach the NTP pool. Check firewall rules for outbound UDP port 123.

04. Manual Time Sync

If the clock is significantly off (more than a few minutes), chrony may refuse to adjust it gradually. Force an immediate sync:

# Force immediate step correction
chronyc makestep

# Or stop chrony, set time manually, restart
systemctl stop chronyd
date -s "2026-03-26 15:30:00"
systemctl start chronyd

For servers still using ntpd:

# Stop ntpd, force sync, restart
systemctl stop ntpd
ntpdate pool.ntp.org
systemctl start ntpd

05. Setting the Timezone

If the time is correct in UTC but displaying wrong in logs or cPanel, the timezone is misconfigured:

# Check current timezone
timedatectl

# List available timezones
timedatectl list-timezones | grep America

# Set timezone (Ultra Web Hosting standard: US Central)
timedatectl set-timezone America/Chicago

# Verify
date

After changing the timezone, restart services that cache the timezone (Apache, MySQL, PHP-FPM, cron):

systemctl restart httpd
systemctl restart mysql
systemctl restart crond

06. OpenVZ/Virtuozzo Considerations

On OpenVZ containers, the system clock is controlled by the host node. The container cannot run its own NTP service or adjust the hardware clock independently. If the time is wrong on an OpenVZ VPS:

The fix must happen on the host node - Contact the hosting provider (or check the host node if you manage it) to fix NTP sync at the hypervisor level.

Timezone can still be set in the container - You can change the timezone within the container even if you can't change the base clock.

KVM-based VPS instances (which Ultra Web Hosting uses for VPS plans) can run their own NTP service independently and don't have this limitation.

Time Still Drifting?

If the clock keeps drifting after configuring NTP, there may be a hardware issue with the server's real-time clock or a hypervisor configuration problem. Open a ticket and we'll investigate.

Open a Support Ticket

Quick Recap: Fixing VPS Time Sync

  1. Check the offset - Run chronyc tracking to see how far off the clock is
  2. Use chrony - Install and enable chrony if it's not already running
  3. Force sync if needed - Use chronyc makestep for large offsets
  4. Set the timezone - Use timedatectl set-timezone to fix display issues
  5. Check firewall - Ensure outbound UDP 123 is open for NTP traffic

Last updated March 2026 · Browse all Server Maintenance articles

  • 124 Users Found This Useful

Was this answer helpful?

Related Articles

Remount /tmp with exec permission

Server Maintenance | Updated 2026 Some software installations and compilation tasks require...

Manually Clear from Console / Command Line cPanel Exim Mail Queue

Server Maintenance | Updated 2026 If the Exim mail queue on a cPanel server is backed up with...

Error: rpmdb Open Failed with cPanel

Server Maintenance | Updated March 2026 The "rpmdb open failed" error means the RPM database...

Clear cPanel Eximstats DB and Repairing the Eximstats DB

Server Maintenance | Updated 2026 The Eximstats database in cPanel tracks email delivery...

Failed to start tailwatchd - Unit tailwatchd service entered failed state

Server Maintenance | Updated 2026 The error Failed to start tailwatchd - Unit...



Save 30% on web hosting - Use coupon code Hosting30