Clocks
How Your Computer Knows the Exact Time (and Why It's Sometimes Wrong)
October 22, 2026
Most of us never think about where our computer's time comes
from. It's just there in the corner of the screen, and it's right. Until one
day it isn't, and suddenly websites throw security errors, your two-factor
codes stop working, or you're five minutes late to a meeting you thought you
were early for.
If you've been wondering why your computer clock is wrong,
the answer is usually simple once you know how the time gets there in the first
place.
Every device has its own small clock
Inside your computer or phone there's a tiny quartz crystal
that vibrates at a very steady rate. The device counts those vibrations to keep
time. On computers there's also a small battery on the motherboard, often
called the CMOS battery, which keeps that clock running when the machine is
switched off or unplugged.
Quartz is good but not perfect. Temperature and age change
the vibration rate slightly, so a device left to itself slowly drifts. A few
seconds a week doesn't sound like much, but over months it adds up to minutes.
The internet keeps it honest
To stop that drift, devices regularly check their time
against time servers on the internet, using something called the Network Time
Protocol (NTP). Windows checks against Microsoft's time servers by default,
Macs and iPhones use Apple's, and Android uses Google's servers or the time
from your mobile network.
Those servers get their time from atomic clocks and GPS
satellites, which are accurate to tiny fractions of a second. By the time it
reaches your device, you're typically within a fraction of a second of the real
time. More than good enough for anything normal people do.
At work it's slightly different. Company computers joined to
a domain usually take their time from the company's own servers instead, which
in turn sync with an outside source. That keeps every machine on the network in
step with each other.
Why the clock ends up wrong
If the time is off, it's almost always one of these.
Automatic time is switched off. Someone set the time
manually once, and the device has been drifting ever since.
The time zone is wrong. If your clock is out by
exactly one hour, or a whole number of hours, the time itself is probably fine.
The device just thinks you're somewhere else. This often happens after travel,
or when automatic time zone detection picks the wrong place.
Daylight saving got confused. Clocks an hour off
around late March or late October usually point to a time zone setting that
doesn't match your actual region.
The CMOS battery is dying. On older desktops and
laptops, a clock that resets to a strange date every time you unplug the
machine is the classic sign. The battery is cheap to replace.
Dual-booting Windows and Linux. The two systems store
hardware time differently. Windows uses local time and Linux uses UTC, so
switching between them can shift the clock by several hours each time.
The network blocks time sync. Some strict networks
block the traffic NTP uses, so the device can't check in and slowly drifts.
Why a wrong clock causes so much trouble
A lot of security depends on time.
Websites use certificates with start and end dates. If your
clock is far enough off, your browser thinks the certificate isn't valid yet or
has expired, and you get scary warnings on perfectly safe sites.
The six-digit codes from authenticator apps are based on the
current time. If your phone's clock is off by more than a little, the codes
won't match and logins fail.
On work networks, sign-in systems often reject computers
whose clocks are more than a few minutes out. To the user it just looks like
their password suddenly stopped working.
And of course, anything scheduled (backups, reminders,
meetings) happens at the wrong moment.
How to fix it
The fix is nearly always to turn automatic time back on and
make sure the time zone is right.
- Windows
11: Settings > Time & language > Date & time. Turn on
"Set time automatically", check the time zone, then click
"Sync now".
- Mac:
System Settings > General > Date & Time. Turn on "Set time
and date automatically" and check the time zone.
- iPhone
and iPad: Settings > General > Date & Time > Set
Automatically.
- Android:
usually Settings > System > Date & time, then turn on automatic
date and time. The exact names vary by brand.
On a work computer, if the settings are greyed out, they're
managed by your IT team. Raise a ticket instead of trying workarounds. A clock
problem on a company machine can be a sign of a wider network issue they'll
want to know about.
If the clock keeps resetting after the computer has been
switched off, and automatic sync is on, suspect the CMOS battery.
How to check if your time is right
Compare your device against an official time source. Search
for your country's official time service, or use a well-known site like
time.is, which also tells you how far off your clock is.
One honest note about clocks on websites, including WakeMode's
Fullscreen Clock and World Clock: they show your device's time. If
your device is wrong, they will be too. Fix the device and every clock follows.
So, to answer the question: your computer keeps its own time
with a small quartz clock, corrects it regularly over the internet, and only
goes wrong when that sync is switched off, blocked, or pointed at the wrong
time zone.

