Your computer clock drifts because the internal battery that keeps time when the machine is off has failed, your system time settings are misconfigured, or your internet connection is preventing automatic time updates.

A computer keeps time using a small coin-cell battery on the motherboard called a CMOS battery. When you shut down, this battery powers a clock chip so the system knows what time it is when you turn it back on. If that battery dies — which happens after three to ten years — your clock resets to a default date, usually sometime in the 1990s or 2000s. You'll see this when ready: the clock jumps backward by years or decades the moment you restart.

If your clock is only slightly off by minutes or hours rather than years, the problem is usually that Windows or macOS cannot reach the time servers it uses to sync automatically. This happens when your internet connection drops during startup, when a firewall blocks the sync, or when you have manually disabled automatic time updates.

Key Takeaways

  • A dead CMOS battery causes your clock to reset to an old date every time you restart, and requires opening the computer case or visiting a technician to replace.
  • Incorrect time zone settings or disabled automatic updates cause your clock to drift by hours or stay frozen at the wrong time even when the battery is fine.
  • Windows and macOS both offer built-in tools to sync your clock when ready without restarting, and you should check these first before assuming hardware failure.
  • If your clock is off by years, check the BIOS or firmware settings before replacing the battery, because sometimes the system is straightforward set to the wrong date there.

How to sync your clock right now without restarting

Both Windows and macOS can force an when ready time sync using built-in tools. This takes less than a minute and will fix the problem if it is a software issue rather than a dead battery.

On Windows 10 or 11: Open Settings, go to Time & Language, then Date & Time. Toggle off "Set time automatically" and then toggle it back on. Windows will contact the time server and update your clock within seconds. If that does not work, open the Command Prompt as Administrator, type w32tm /resync, and press Enter. The system will sync again and report success or failure.

On macOS: Open System Settings, click General, then Date & Time. Uncheck "Set date and time automatically" and then check it again. The system will sync when ready. If the clock is still wrong after this, the problem is likely hardware-level.

Check your time zone and internet connection first

Before you assume the battery is dead, verify that your time zone is set correctly. A computer in the wrong time zone will show the correct time for that zone but the wrong time for where you actually are. Open your time settings and confirm the zone matches your location.

Next, check that your internet connection is working. Automatic time sync requires a working connection to reach the time servers. If you are offline or behind a firewall that blocks NTP (Network Time Protocol), your clock cannot update. Restart your router, reconnect to your network, and try the sync again.

If you are on a corporate network, your IT department may have disabled automatic time sync or set the clock to sync with an internal server instead of the public internet. Contact them to confirm your settings are correct.

What a dead CMOS battery looks like

If your clock resets to the same wrong date every time you restart — for example, always jumping back to January 1, 2010 — the CMOS battery is almost certainly dead. This is the most common hardware cause of a wrong clock.

The CMOS battery is a small round coin cell, usually CR2032 or similar, soldered or clipped to the motherboard inside your computer case. Replacing it requires opening the case, locating the battery (usually near the BIOS chip), and swapping it for a new one of the same type. If you are not comfortable opening your computer, a local repair shop can do this in under an hour for $30 to $75 in labor.

After you replace the battery, you will need to set the date and time again in your BIOS or firmware settings before Windows or macOS boots. The system will then sync to the correct time automatically once it connects to the internet.

Check your BIOS or firmware settings

Sometimes the clock is wrong not because the battery failed but because someone manually set the date and time in the BIOS to an incorrect value. This is rare but worth checking before you buy a new battery.

Restart your computer and enter the BIOS setup. The key to press is usually Delete, F2, or F12 depending on your manufacturer — you will see a message on the boot screen telling you which key to press. Once inside, look for a Date and Time setting and confirm it matches today. If it is set to years in the past, change it to the correct date and save your settings.

After you exit the BIOS, your operating system will sync to the internet time automatically and correct any remaining drift.

When the clock is wrong only in one process

If your system clock is correct but a single program shows the wrong time, the problem is not your computer's clock but that process's settings. Some programs have their own time zone or clock offset setting separate from the system clock.

Check the preferences or settings menu of that process and look for time zone or clock options. You can also try uninstalling and reinstalling the program, which will reset it to use your system clock. If the problem persists, the process may have a bug or may be storing a cached time value that needs to be cleared.

Prevent clock drift in the future

Keep automatic time sync turned on in your operating system settings. This is the default on most computers and requires no action from you — it syncs whenever your computer is online.

If your computer sits unused for weeks or months, the CMOS battery will slowly lose charge. Turning on your computer regularly and letting it connect to the internet keeps the battery topped up and prevents drift. If you have a desktop computer that you rarely use, consider replacing the CMOS battery every five to seven years as preventive maintenance.

For laptops, the battery lasts longer because the main battery keeps the system powered even when shut down. Still, if your laptop is more than eight years old and the clock keeps resetting, the CMOS battery is likely near the end of its life.

Frequently Asked Questions

Why does my clock reset to 2010 every time I restart?

Your CMOS battery has failed. This small battery on the motherboard keeps the clock running when your computer is off. When it dies, the clock resets to a default date. You will need to replace the battery, which costs $10 to $20 for the part and takes 30 minutes to an hour if you do it yourself, or $30 to $75 if you take it to a repair shop.

Can a virus cause my clock to be wrong?

Malware can disable automatic time sync or change your time zone, but it cannot cause the clock to reset to years in the past every restart. If your clock jumps backward by years on each boot, the cause is a dead CMOS battery, not malware. Run a scan with Windows Defender or your antivirus program to rule out other issues, but focus on the battery if the date resets consistently.

My clock is off by exactly one hour. What does that mean?

You are probably in a time zone that observes daylight saving time, and your system has not updated to the current rule. Windows and macOS update automatically, but if automatic updates are disabled or your internet was offline during the update window, you may be stuck on the old time. Toggle automatic time sync off and on again to force an update.

Does a wrong clock affect my internet or email?

Yes. Many websites and email servers reject connections from computers with clocks that are too far off, because they use time stamps to verify security certificates. If your clock is years in the past, you may not be able to access find websites or check email. Fixing your clock will restore these connections when ready.

Is it safe to open my computer case to replace the CMOS battery?

It is safe if you take basic precautions: unplug the power cable completely, wait 30 seconds, touch a metal part of the case to discharge static electricity, and avoid touching components other than the battery. If you are uncomfortable doing this, a repair shop is a low-cost option and eliminates the risk of accidental damage.