NTP - Network Time Protocol
The Need for Accurate Time
Telling the time is incredibly important for our day to day lives. We need to know what time to get up for work, when to catch the bus and even when to go to bed to ensure we get enough shut eye.
Generally for this type of timekeeping mechanical or digital watches provide us with ample accuracy. A digital watch will probably not lose more than a second over the space of a week and I'm sure your boss won't be too mad if you arrive a second late for your shift.
However, when it comes to transmitting data over the Internet, controlling satellites or even purchasing shares on the stock market more accurate timing is required.
Computer networks rely on timekeeping for nearly all their applications, from sending an email to saving data, a timestamp is necessary for computer to keep track. Also routers and switches all need to run at the same rate, out of sync devices can lead to data being lost and even entire connections.
For satellite navigation, long used by ships and airlines but now increasingly popular in modern cars, accuracy to within a millisecond (a thousandth of a second) is essential as light (and therefore radio waves) can travel 300 km in that time so any tiny error in the time signal would mean satellite navigation could be inaccurate by hundreds of miles.
Computers need to not only be synchronized to their network but and time sensitive transactions with other networks, computers or over the Internet also require synchronization. Imagine bidding on Ebay and placing the last bid only for the auction houses computer running a different time recognizing an earlier bidder as the last one, you would certainly be annoyed.
For this reason a global standardised time scale is used to allow all computers across the globe to synchronise to the exact same time source. This global scale is called UTC (Universal Coordinated Time).
UTC time is based on International Atomic Time (TAI) which is the time as told by an international collective of atomic clocks (260 in 40 different laboratories around the globe) where an average is taken meaning that TAI is accurate to within one second every three million years.
UTC time has leap seconds added (or taken away) every year or so to compensate with the slowing (and occasional speeding up) of the Earths rotation as our planet is actually 100,000 times less reliable than an atomic clock and without leap seconds noon would eventually become midnight (albeit in 40,000 years or so).
Computers use a protocol called NTP (Network Time Protocol) which can receive a UTC time signal either through the Internet or via a specialist radio transmission from a physics laboratory or via the GPS network.
NTP servers then ensure that all devices connected to that network are synchronized to UTC allowing computers across the globe to communicate effectively with each other.