How Do Computers Know the Time?

Computer Time Featured

Have you ever wondered how your computer seems to know what time it is? Even if you know about how it gets the time in the first place, how does it remember it while it’s turned off? Let’s explore how your computer tells the time and how it remembers every reboot.

How Does Your Computer Know What Time It Is?

It’s likely that when you first booted up your computer, it already had the time showing correctly. This is because most modern-day operating systems use the Internet to sync with a time server. This lets the computer know what time it is, and your PC sets the clock accordingly.

Computer Time Clock

For example, this Windows 10 clock uses the National Institute of Standards and Technology to get the correct time. If you visit NIST’s time website, you can see it keeping track of US time. Of course, if you live in another country, your own system clock may use a different website, as NIST is run by the US government.

Why can we can trust NIST (or your regional equivalent) with our time? These timekeeping organizations use Cesium atomic clocks to keep track of what time it is. These are very accurate, as they don’t have moving parts that can go wrong (like a wall clock) or data that can get corrupted or changed (like a digital clock). In fact, a second as a time unit is defined by 9,192,631,770 cycles of Cesium, meaning these clocks use the same technology that scientists use to define a second in the first place!

How Does Your Computer Remember What Time It Is?

This is all well and good, but let’s consider a specific scenario. Let’s say you lose your Internet connection, which means your PC can’t sync anymore. Annoyed at the lack of Internet, you decide to go to bed, only to find the Internet is still down in the morning. You boot up your PC, and – despite there being no sync capabilities – it still knows what the time is!

This is because, even without Internet sync, your PC can remember and keep track of time by itself. In fact, you can see your PC’s ability to remember the time in the UEFI/BIOS. This loads before you boot into an operating system, and you can see the system clock ticking away when you access the UEFI/BIOS screen. This lets you see your PC’s time-telling abilities in action without an operating system stepping in with its time-sync feature.

Computer Time Motherboard

How is the computer remembering the time after it shuts down? Inside your computer is an internal clock, which keeps track of the time. When your computer shuts down, this clock keeps ticking even if you unplug the PC from the mains. That’s because the computer’s motherboard has a Complementary Metal Oxide Semiconductor (CMOS) battery on it which keeps the clock powered up even if the rest of the motherboard has no power.

CMOS batteries are meant to last around 10 years, but things can go wrong with them. For instance, if you boot up your PC, and it has since forgotten the time, that means the battery is dead and isn’t powering the internal clock. You may also get warnings about a “CMOS error” while booting up.

Keeping Track of Time

Our computers keeping track of time is so second nature, we often don’t ask how it manages it. Whether it’s syncing to a Cesium atomic clock or remembering the time via a battery, there’s plenty going on inside your PC to make sure you don’t miss your fave TV show.

Have you ever experienced a CMOS error before? Let us know below.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Simon Batt Avatar

Read next

When Sony shipped the first Walkman in 1979, chairman Akio Morita insisted on a second headphone jack and a “hotline” talk button, convinced it would be rude for one person to listen to music alone — and within a few years buyers had ignored the sociable features so completely that Sony quietly dropped them
Russia still custom-builds the Soyuz return seats for ISS crew members using plaster casts taken weeks before launch, because astronauts grow as much as five centimetres taller during a long-duration stay and a seat moulded to their Earth-shaped spine would no longer fit the body that comes home
The “CrackBerry” nickname stuck for a reason — and the variable-reward psychology that hooked early-2000s executives on their BlackBerrys is the exact same machinery now running every push notification on every smartphone in your pocket
In 1843, Ada Lovelace described a brass-and-punched-card engine that could act on symbols as well as numbers, even composing music if harmony could be reduced to rules, inside seven translator’s notes three times longer than the paper itself
ARPANET sent its first message on 29 October 1969 from a lab at UCLA to a machine at Stanford, and the message was supposed to read ‘LOGIN’ — but the system crashed after the L and the O, meaning the first word ever transmitted over the network that became the internet was, by accident, ‘LO’.
In 1995, Microsoft shipped a cartoon-house interface called Bob, led by Melinda French, who married Bill Gates while it was in development — it demanded twice the memory of a typical home PC, sold roughly 30,000 copies, and was dead within a year, leaving behind the font Comic Sans and the animated assistant that became Clippy.
The Greenland shark grows about one centimetre a year, does not reach sexual maturity until around age 150, and a specimen carbon-dated by Danish researchers in 2016 was estimated to be at least 272 years old, meaning it was already swimming the North Atlantic when Mozart was composing symphonies.
When Apple shipped iOS 12 in June 2018, a small feature called Screen Time slipped onto every iPhone with a counter nobody had quite prepared for — a tally of pickups — and within a day Tim Cook was telling CNN the number of times he picked up his own phone was simply too many