Why your computer's clock matters and how to fix it

Your computer's internal clock controls when files are saved, when emails are timestamped, and when your system performs scheduled tasks. If the time is wrong, your computer will record events with incorrect dates and times, which can confuse file backups, mess up scheduled updates, and make it harder to troubleshoot problems later. The fix depends on your operating system, but most people can correct it in under a minute without calling anyone.

The most common cause is a dead or dying CMOS battery — a small coin-shaped battery inside your computer that keeps the clock running even when the machine is powered off. If your time resets every time you restart, that battery is likely the culprit. If the time just drifts slowly or is straightforward wrong, a software adjustment usually fixes it.

Key Takeaways

  • Windows and Mac both have built-in settings to sync your clock with internet time servers, which is the fastest fix for most people.
  • If your time resets every time you restart your computer, the CMOS battery inside the machine may be dead and needs replacement.
  • You can manually set the time in your system settings, but automatic synchronization prevents the problem from happening again.
  • If automatic sync is turned on but the time still drifts, your computer may not be connecting to the time server, and you should check your internet connection.

How to fix the time on Windows 10 and Windows 11

Open the Settings app by pressing the Windows key and typing "Settings," then click the app when it appears. Once Settings opens, click Time & language on the left side, then click Date & time.

Look for the toggle labeled Set time automatically. If it is already turned on (the toggle is blue), your computer should be syncing with internet time servers. Turn it off and back on again to force an when ready sync. If the toggle is off, click it to turn it on. Windows will now pull the correct time from Microsoft's time servers.

If the time is still wrong after you turn on automatic sync, scroll down and click Sync now to manually trigger an update. If that does not work, check that your internet connection is active — your computer cannot reach the time server without it.

How to fix the time on Mac

Click the Apple menu in the top-left corner and select System Settings (or System Preferences on older versions). Click General in the sidebar, then click Date & Time.

Look for the checkbox labeled Set date and time automatically. If it is unchecked, click it to enable automatic time synchronization. Mac will now sync with Apple's time servers. If the checkbox is already checked but the time is still wrong, uncheck it, wait a few seconds, then check it again to force a fresh sync.

If you need to set the time manually, click the lock icon at the bottom of the window, enter your Mac password, then click the date and time fields to edit them directly. This is useful if automatic sync is not working and you need the correct time right away.

When the CMOS battery is the real problem

If your computer's time resets to the same wrong time every time you restart — for example, it always jumps back to January 1, 2020 — the CMOS battery inside your computer is dead. This battery is separate from your main power supply and keeps the clock running when the computer is off. When it dies, the clock loses track of time.

Replacing the CMOS battery requires opening your computer's case. On a desktop, this is usually straightforward: power off the machine, unplug it, open the side panel, locate the small coin-shaped battery on the motherboard, pop it out, and snap in a new one (usually a CR2032 battery, available at any pharmacy or electronics store for a few dollars). On a laptop, the process is more involved and varies by model — you may need to remove the keyboard or bottom panel, and some laptops require partial disassembly. If you are not comfortable opening your computer, a repair shop can do this in 15 minutes for a small fee.

After you replace the battery, power the computer back on, set the time correctly, and enable automatic synchronization. The time should now stay correct even after restarts.

Checking your internet connection if automatic sync fails

Automatic time synchronization requires an active internet connection. If you have turned on automatic sync but the time is still wrong or keeps drifting, your computer may not be reaching the time server.

First, check that you are connected to the internet. On Windows, look for the network icon in the system tray (bottom-right corner) — it should show a connected network. On Mac, click the Wi-Fi icon in the menu bar and confirm you are connected to a network. If you are not connected, connect to your Wi-Fi or wired network and try syncing again.

If you are connected but sync still fails, restart your computer. Sometimes the connection to the time server gets stuck, and a restart clears it. If the problem persists after a restart, your internet service provider or network may be blocking access to the time server, which is rare but possible on some corporate or school networks. In that case, you can set the time manually or contact your network administrator.

Manually setting the time if automatic sync is not available

If you cannot use automatic synchronization — for example, if you are on a network that blocks time servers — you can set the time manually.

On Windows, open Settings, go to Time & language > Date & time, turn off Set time automatically, then click on the time field to edit it. Type the correct time in the format shown (usually HH:MM AM/PM), then press Enter. On Mac, open System Settings, go to Date & Time, uncheck Set date and time automatically, then click the date and time fields to edit them.

Manual setting works, but automatic synchronization is better because it corrects small drifts over time. If you have to set the time manually, check it once a week to see if it is drifting. A drift of more than a few minutes per week suggests a hardware problem, usually the CMOS battery.

When to call a professional

If automatic synchronization is on and your internet connection is active, but the time still resets every time you restart, the CMOS battery is almost certainly dead. You can replace it yourself on a desktop in 10 minutes, but if you are uncomfortable opening your computer or if you have a laptop, take it to a repair shop. The repair usually costs between $30 and $75 and takes less than an hour.

If the time drifts slowly even with automatic sync on, and you have confirmed your internet is working, the issue may be a failing motherboard or a corrupted system file. This is rare, but a technician can diagnose it. Do not ignore a drifting clock — it can cause problems with file backups, scheduled tasks, and security certificates over time.

Frequently Asked Questions

Why does my computer's time reset every time I restart?

The CMOS battery inside your computer is dead. This battery keeps the clock running when the computer is powered off. When it fails, the clock loses all memory of the correct time and resets. Replacing the battery (usually a CR2032, available at any pharmacy) solves the problem permanently.

Can I fix the time without opening my computer?

Yes, if the time just drifts or is wrong but does not reset on restart. Turn on automatic time synchronization in your system settings and make sure your internet connection is active. If the time resets on every restart, you must replace the CMOS battery, which requires opening the computer.

What if automatic sync is on but the time is still wrong?

Check that your internet connection is active. If it is, try manually syncing by clicking "Sync now" on Windows or toggling the automatic setting off and back on on Mac. If that does not work, restart your computer. If the problem persists, your network may be blocking the time server.

Is it safe to replace the CMOS battery myself?

On a desktop, yes — it is a straightforward swap that takes a few minutes. Power off and unplug the computer first, then pop out the old battery and snap in the new one. On a laptop, the process is more complex and varies by model, so a repair shop is safer.

How often do CMOS batteries need to be replaced?

A CMOS battery typically lasts 3 to 10 years depending on the computer's age and how often it is powered on. If your computer is more than 5 years old and the time keeps resetting, the battery is likely at the end of its life.