# Time Drift (NTP)

When your server’s time doesn’t match an authoritative time, such as [ntp.org](http://www.ntp.org/), you have a problem called _time drift_. This problem is incredibly common and happens slowly over weeks and months. To easily check the time drift, compare the server’s current date and time to [The Official NIST Time](https://www.time.gov/). Make sure you are comparing to the correct time zone.

## Effects

Possible issues caused by time drift on a cluster of servers include:

- Timestamps on log messages don’t match
- Authentication expiring either sooner or later than intended
- Inconsistent reporting of daily, weekly, or monthly stats
- After paying, subscriptions aren’t immediately valid

Syncing your servers with a common time server ensures that your applications all operate on the same time and avoid these problems. NTP (Network Time Protocol) is a daemon that makes small, innocuous changes to the server’s clock to negate time drift.

We also recommend you use the UTC time zone on everything (though we won’t create a recommendation for this particular suggestion).

## Quick Fix

Manually change the date and/or time on your servers. Keep time zones in mind.

## Thorough Fix

Use ntpdate to perform a one-time sync on all your servers to the [ntp.org](http://www.ntp.org/) pool in your region. Once synced, use the NTP daemon specific to your OS to manage time drift.

If you have many servers that need to be closely in sync, you should manage your own NTP server that syncs to an NTP pool.

## Resources

- [The Official NIST US Time](https://www.time.gov/) (NIST)
- [How do I use pool.ntp.org?](http://www.pool.ntp.org/use.html) (NTP.org)
- [ntpd - Network Time Protocol (NTP) daemon](http://doc.ntp.org/current-stable/ntpd.html) (NTP.org)
- [ntpdate - set the date and time via NTP](http://doc.ntp.org/current-stable/ntpdate.html) (NTP.org)
- [How to configure NTP client in Linux](https://kerneltalks.com/config/how-to-configure-ntp-client-linux/) (Kernel Talks)
- [date man page - print or set the system date and time](http://linuxcommand.org/lc3_man_pages/date1.html) (Linux Manual Page)
- [How to configure an authoritative time server in Windows Server](https://support.microsoft.com/en-us/help/816042/how-to-configure-an-authoritative-time-server-in-windows-server) (Microsoft Support)
- [Windows Time Service Tools and Settings](https://docs.microsoft.com/en-us/windows-server/networking/windows-time-service/windows-time-service-tools-and-settings) (Windows IT Pro Center)
