What Happens When a Computer's Clock Is Off by Just One Second
Your PC or smartphone's clock appears remarkably accurate. However, a computer's built-in clock (crystal oscillator) drifts by several seconds to tens of seconds per day. If left uncorrected, TLS certificate verification fails, two-factor authentication one-time passwords become invalid, log timestamps become unreliable, and distributed system data integrity collapses.
NTP (Network Time Protocol) is the protocol that corrects this "clock drift" over the internet.
NTP - A Protocol Keeping Time Since 1985
NTP was designed by David L. Mills in 1985 and is one of the oldest internet protocols still in operation today. NTP operates using a hierarchical structure called Stratum.
- Stratum 0: High-precision time sources such as atomic clocks and GPS receivers. Not directly connected to the network
- Stratum 1: NTP servers directly connected to Stratum 0. Known as "primary reference clocks"
- Stratum 2: Servers that obtain time from Stratum 1. Many public NTP servers operate at this level
- Stratum 3 and beyond: Servers that sequentially obtain time from lower-tier servers. Maximum of Stratum 15
NTP doesn't simply copy the server's time - it measures and compensates for network latency. It obtains time from multiple servers and uses an algorithm that statistically selects the most reliable value.
What Breaks When the Clock Is Off
TLS Certificate Verification
TLS certificates have a validity period (Not Before / Not After). If the client's clock is significantly off, it may judge a valid certificate as "expired" or an not-yet-valid certificate as "valid." The Certificate Transparency mechanism also depends on accurate time.
TOTP (Time-Based One-Time Passwords)
Authenticator apps like Google Authenticator generate codes that change every 30 seconds based on the current time. If the server and client clocks are more than 30 seconds apart, the codes won't match and login becomes impossible.
Kerberos Authentication
Kerberos authentication, used in Active Directory, does not tolerate clock differences of more than 5 minutes by default. If NTP goes down on a corporate network, every employee can be locked out.
Distributed Databases
Distributed databases like Google Spanner determine transaction ordering by time. Google developed a proprietary time synchronization system called TrueTime, combining atomic clocks and GPS to achieve microsecond-level precision.
Log Reliability
When investigating security incidents, logs from multiple servers are correlated chronologically. If clocks are out of sync, the causal relationships between events cannot be accurately reconstructed.
Leap Seconds - Time Synchronization's Greatest Enemy
Because the Earth's rotation speed isn't constant, "leap seconds" are occasionally inserted to correct the drift between atomic clock time (UTC) and time based on Earth's rotation. A normally nonexistent second, 23:59:60, is added after 23:59:59.
During the 2012 leap second insertion, a Linux kernel bug caused outages at Reddit, Gawker, LinkedIn, and other services. Much software assumed "a minute has 60 seconds" and didn't account for a 61st second.
In response, Google developed a technique called "leap smear." Instead of inserting the leap second all at once, it gradually adjusts the time over 24 hours. In 2022, the General Conference on Weights and Measures (CGPM) adopted a resolution to abolish leap seconds by 2035.
Summary
Time synchronization is one of the most unglamorous pieces of the internet's "invisible infrastructure," yet its importance is immeasurable. TLS, 2FA, Kerberos, distributed databases, log analysis - all of these depend on accurate time. When you check your connection information on IP Check-san, the TLS handshake powering that communication also relies on precise time synchronization.