whattimeisit.blog
Computing time

How Computers Keep Time: Quartz Clocks, NTP and Time Zones

A computer’s clock starts with a tiny oscillator, but staying close to official time takes more than counting ticks. Here’s how the hardware, operating system, internet time servers and time-zone rules work together.

By Leo, editorUpdated November 10, 20267 min read8 sources
Quartz timing circuit beside a computer and network cable
Illustration created for WhatTimeIsIt.blog.
Quick answer

Computers count regular electrical oscillations from a quartz crystal to keep a clock running, then the operating system maintains the system time and can correct it using Network Time Protocol (NTP). NTP helps align a computer’s clock with UTC; a time-zone database then converts that shared reference into local time. NIST explains that operating systems commonly synchronize with NTP servers in the background, while quartz clocks can drift because their oscillation frequency is not perfectly constant. NIST

  • IMany quartz watches use a 32,768 Hz crystal.
  • IINTP helps computers synchronize their system clocks with UTC.
  • IIIUTC does not change for daylight saving time.
  • IVIANA time-zone rules determine local clock changes.
  • VA small frequency error can accumulate into clock drift.
I

A quartz crystal gives the computer a steady tick

A clock needs a repeating event that it can count. In a quartz clock, an electrical circuit makes a quartz crystal vibrate at a regular frequency. NIST notes that most wristwatch quartz crystals vibrate at about 32,768 times per second, or 32,768 hertz. A circuit divides those rapid oscillations down into a slower signal that can be counted as seconds. NIST’s clock FAQ

Many computers use a similar quartz-based timing component in a real-time clock (RTC). The RTC keeps track of the date and time even when the computer is off, provided it has power. When you start the computer, the operating system can read the RTC and use its value to initialize the system clock.

The crystal is a useful timekeeper, not a perfect one. Its frequency can be slightly faster or slower than its intended rate. A tiny difference in each tick can add up over many hours or days, which is why computers periodically compare their clocks with an external time source.

Quartz clock basics, based on NIST’s timekeeping FAQ
PartWhat it does
Quartz crystalVibrates at a regular frequency when driven by an electrical circuit.
Divider circuitTurns many rapid oscillations into a slower timing signal.
Clock circuitryCounts the signals to keep track of time intervals.
II

The RTC and operating-system clock have different jobs

The RTC and the operating-system clock are related, but they are not the same thing. The RTC is a hardware clock that keeps a basic date and time available across shutdowns. Once the computer is running, the operating system maintains a system clock for applications and services to use. NTP’s specification describes its goal as reducing the differences between UTC and a system clock. RFC 5905

Programs rely on that system clock for tasks such as adding timestamps to files, recording events, scheduling jobs and showing the time on screen. A program that needs to measure how long something takes may use a separate elapsed-time counter rather than comparing calendar time. That distinction matters: changing the displayed clock should not necessarily make a timed task appear to have run backward or forward.

Some systems represent time as a count from an agreed starting point, then translate that value into a date and clock reading. Unix time, for example, counts seconds from its epoch at January 1, 1970, 00:00 UTC. The Unix time guide explains that representation, and the Unix timestamp converter can help you interpret a timestamp.

A computer can therefore have a hardware clock, a live system clock, and time values stored by applications. They serve different purposes, and a mismatch between them can make a file’s timestamp or a scheduled event look unexpected.

III

NTP checks the computer against a time reference

Network Time Protocol, or NTP, lets computers request time information from servers and adjust their system clocks. Many operating systems synchronize automatically in the background, often starting at boot, rather than asking you to set the clock by hand. NIST operates time servers whose information is traceable to UTC(NIST), its realization of the U.S. time standard. NIST’s Internet Time Service

NTP is designed to account for the fact that a request and reply take time to cross a network. A client may compare responses from more than one source and use the results it considers reliable. The quality of the connection matters: network delay and instability affect how closely the received time matches the reference. NTP is widely used for internet time synchronization, but it does not make every computer’s display identical to a national time standard at every instant. RFC 5905

How network time synchronization works, based on RFC 5905 and NIST
StepWhat happens
RequestThe computer asks an NTP server for time information.
ComparisonThe client evaluates the response, including timing information.
CorrectionThe operating system adjusts its system clock toward the reference.
RepeatThe client checks again later to limit accumulated drift.

For the U.S. official time reference and the international standard, it helps to distinguish UTC from a local clock display. UTC is the shared reference; a local time zone is applied afterward. Use the UTC clock to view that reference or the NTP guide for more on network synchronization.

IV

Why a computer clock drifts

A quartz clock drifts when its actual frequency differs slightly from its intended frequency. If it runs a little fast, it gains time; if it runs a little slow, it loses time. NIST explains that oscillator aging can change an oscillator’s frequency over time because of internal changes, including changes in the quartz material or its structure. NIST’s Time and Frequency A to Z

The effect can be hard to notice at first because each individual tick is only slightly off. Over a longer interval, those small differences accumulate. NIST gives an example in which a 32,768 Hz watch crystal that is off by 0.1 Hz would lead to about 0.26 seconds of error per day. That example illustrates why a device can show the right time after a sync and still be a little ahead or behind later. NIST’s clock FAQ

Other causes of a wrong displayed time are not oscillator drift. A person may set the clock manually, an automatic sync setting may be disabled, or the device may have an incorrect time zone. If the time is wrong by a consistent number of hours, check the time zone before assuming the hardware clock is failing.

For elapsed-time calculations, distinguish between a clock reading and a duration. A time-duration calculator can work out the interval between two times, while a stopwatch is better for timing an event as it happens.

V

UTC becomes local time through IANA time-zone rules

UTC gives computers a common time reference, but people usually want a local clock reading. The operating system applies the selected time zone to the underlying time and displays the appropriate local date and time. UTC itself does not shift for daylight saving time; for example, Eastern Standard Time is UTC−5 and Eastern Daylight Time is UTC−4. NIST’s UTC explanation

Time-zone rules are more than a fixed number of hours. The IANA time-zone database records rules for geographic zones, including changes that affect local time. Governments can change those rules, so computers need updated time-zone data to show the correct local time for future events. A device may have the correct UTC time but still display the wrong local time if its selected zone or rule data is wrong. IANA time-zone database

Local time examples calculated from NIST’s stated standard-time offsets
Reference timeZoneLocal time
6:00 p.m. UTCEastern Standard Time, UTC−51:00 p.m.
6:00 p.m. UTCMountain Standard Time, UTC−711:00 a.m.

Those examples use standard-time offsets; daylight saving rules can change the result depending on the location and date. For a meeting across regions, check with the time-zone converter or time-difference tool. A fixed offset conversion can be misleading if you do not account for a seasonal rule change.

VI

Why your phone time may be wrong

A phone can show the wrong time for several different reasons. It may have failed to synchronize with a time server, have automatic time turned off, or have a manually set clock. Or the clock itself may be close to correct while the phone is using the wrong time zone. NIST notes that operating systems commonly synchronize with NTP in the background, but users can also set a system clock manually. NIST’s Internet Time Service

If the phone is off by seconds, consider whether it has recently synced and whether it can reach its configured time source. If it is off by a whole number of hours, check automatic time-zone selection and the selected region first. If local time rules recently changed, the device may also need updated time-zone data from its operating-system updates. A correct UTC reading and an incorrect local display point to a different problem than a clock that is wrong in both UTC and local time.

Try these checks in order:

  1. Turn on automatic date and time, if available.
  2. Check that automatic time zone is enabled or choose the correct region.
  3. Confirm the device has a working network connection, then allow it to synchronize.
  4. Install available operating-system updates if local time rules may have changed.
  5. Compare the displayed time with a trusted UTC source, then check the local conversion separately.

To compare locations, use the world clock or the meeting planner. For seasonal clock changes, the daylight saving time guide can help explain why two places’ time difference changes during the year.

VII

Clock corrections can affect dates, files and timestamps

When an operating system corrects its clock, the displayed time may change. That can matter for records that depend on timestamps, such as file changes or event logs. The exact way a file system stores and reports timestamps depends on its implementation; the Open Group’s specification says file timestamp resolution is implementation-defined, with a requirement that it be no coarser than one second. The Open Group

Time formats also make different choices about how to represent days and seconds. The same specification says seconds since the Unix epoch approximate elapsed seconds, while each represented day accounts for exactly 86,400 seconds. For everyday scheduling, that is usually hidden behind a calendar and clock display. It becomes more important when you compare logs, calculate durations, or combine timestamps from systems that have different settings.

Daylight saving changes introduce another common complication: a local clock can repeat or skip a time when the offset changes. UTC avoids that local-clock ambiguity as a reference, but a program still needs the right time-zone rules to translate UTC into local calendar time. Use the date calculator for calendar intervals, and check the relevant location’s time-zone rules before treating a local timestamp as unique.

For meetings and records, keep the time zone explicit when possible. Saying “1:00 p.m. Eastern” or recording a UTC timestamp is clearer than storing a bare clock time with no date or location attached.

VIII

A quick way to diagnose a wrong computer clock

Start by deciding whether the problem is the clock’s underlying time or only its local display. Compare the computer with a trusted UTC source, such as NIST’s time.gov. If UTC is wrong too, look at synchronization settings and network access. If UTC is right but the local clock is wrong, check the time zone, daylight saving setting and system time-zone data.

Next, let the computer synchronize. NIST says operating systems commonly contact NTP servers periodically, and Windows provides a “sync now” option in its clock settings. Menu names vary by operating-system version, but the general settings are usually under date and time. If a manual sync fixes the problem temporarily but it returns, the clock may be drifting or the device may not be synchronizing regularly. NIST’s synchronization guidance

Finally, check how large and consistent the error is. A few seconds of difference suggests a synchronization or drift issue; a whole-hour discrepancy more often points to a time-zone setting or local rule. Do not correct a time-zone problem by repeatedly changing the clock by hand, because that can leave the computer’s underlying time wrong and create confusing timestamps.

For a fast cross-check, compare the computer’s local time with UTC and a location-specific clock. A time-zone converter is useful when you know the reference city and need to verify the local result.

?

Questions people ask

Do computers use quartz crystals to keep time?

Many computers use a quartz-based real-time clock to maintain time when they are off. Quartz clocks count electrical oscillations; NIST says most wristwatch quartz crystals vibrate at about 32,768 Hz, with a circuit dividing the frequency down into one-second ticks. A computer’s operating system can then use the hardware clock when starting up.

What does NTP do on a computer?

Network Time Protocol lets a computer request time information from a server and adjust its system clock toward a UTC reference. Many operating systems do this automatically in the background. Network conditions affect how closely a client can match the source, so synchronization reduces drift but does not guarantee that every display is identical at every moment. NIST

Why does my phone show the wrong time?

Automatic time or time-zone settings may be off, the phone may not have synchronized, or its time-zone data may be outdated. Check whether the discrepancy is in UTC as well as local time: a wrong UTC reading suggests a clock or sync issue, while a correct UTC reading with a wrong local display points toward the selected zone or its rules.

Why does a computer clock lose time?

The oscillator that drives the clock can run slightly slower than its intended frequency, so small errors add up. Quartz oscillators can also change frequency as they age. NIST explains that internal changes in an oscillator, including changes to quartz material or structure, can affect its frequency. NIST

Does UTC change when daylight saving time starts?

No. UTC is not adjusted for daylight saving time. Local time changes when a location’s time-zone offset changes, and the operating system applies the relevant time-zone rules to display local time. For example, NIST lists Eastern Standard Time as UTC−5 and Eastern Daylight Time as UTC−4. NIST

Can a computer have the correct UTC time but the wrong local time?

Yes. A computer can keep accurate UTC while displaying the wrong local time because the selected time zone is incorrect or its time-zone rules are out of date. Check the location setting and available system updates before manually changing the clock. IANA maintains the time-zone database used to represent geographic time rules. IANA

§

Sources

  1. NIST Internet Time Service (ITS), National Institute of Standards and Technology (NIST)
  2. Timekeeping and clocks FAQs, National Institute of Standards and Technology (NIST)
  3. Time and Frequency from A to Z, National Institute of Standards and Technology (NIST)
  4. RFC 5905: Network Time Protocol Version 4: Protocol and Algorithms Specification, RFC Editor
  5. How is UTC(NIST) related to Coordinated Universal Time (UTC), International Atomic Time (TAI), Greenwich Mean Time (GMT), USNO time, GPS time and Zulu time?, National Institute of Standards and Technology (NIST)
  6. Time Zones, Internet Assigned Numbers Authority (IANA)
  7. General Concepts — The Open Group Base Specifications Issue 7, 2018 edition, The Open Group and IEEE
  8. time.gov, National Institute of Standards and Technology (NIST)

Edited by Leo, editor of WhatTimeIsIt.blog

Calculations on this page run in your browser using the IANA time zone database and standard calendar rules. Facts are checked against the government agency, standards body or official source linked in the text. Last reviewed November 10, 2026. See the editorial policy or report an error to hello@whattimeisit.blog.