Your computer's clock drifts because the internal battery that keeps time when it's off has died, your system time zone is set wrong, or your internet connection is preventing automatic updates
A computer clock runs on a small coin-cell battery on the motherboard called a CMOS battery. When that battery weakens or fails, the clock resets to a default date (often 2000 or 2005) every time you shut down. If your clock is off by hours rather than years, your time zone setting is probably wrong — Windows and macOS both pull the correct time from internet servers, but they need to know which zone you're in to display it right. A third cause is that your computer can't reach the time servers because your internet connection is down or blocked by a firewall.
The fix depends on which problem you have. Start by checking whether the error is consistent (always the same number of hours off) or whether it resets to a very old date each time you restart. That tells you whether you're dealing with a time zone issue or a dead battery.
Key Takeaways
- A clock that resets to the year 2000 or 2005 every time you shut down points to a dead CMOS battery on your motherboard, which requires opening the computer or taking it to a technician.
- A clock that is consistently off by a whole number of hours usually means your time zone is set wrong in your system settings, which you can fix in under a minute.
- Windows and macOS both sync with internet time servers automatically, but they need an active internet connection and the correct time zone to work.
- Restarting your computer and waiting a few minutes often fixes a clock that is slightly off, because the sync happens in the background after startup.
Check your time zone setting first
Open your system settings and look at the time zone you have selected. On Windows 10 and 11, go to Settings > Time & Language > Date & Time and look at the "Time zone" dropdown. On macOS, go to System Settings > General > Date & Time and check the timezone shown at the bottom. If you recently moved or your computer was set up in a different location, this is the most common reason your clock is wrong.
Change the time zone to match where you are now. Both Windows and macOS have a checkbox for "Set time automatically" — make sure it is turned on. Once you do, the system will contact a time server (usually pool.ntp.org or a Microsoft equivalent) and correct the clock within a few seconds. If the clock is still wrong after you change the zone and wait 30 seconds, your internet connection may be the problem.
Verify your internet connection is working
A computer that cannot reach the internet cannot sync its clock. Open a web browser and try to load a website — if nothing loads, your connection is down. Restart your router by unplugging it for 10 seconds, plugging it back in, and waiting for the lights to stabilize. Then restart your computer.
If your internet works but your clock still will not sync, a firewall or network filter may be blocking the time server. This is common on corporate networks or networks with parental controls. Check whether you can reach other websites normally — if you can, the time server port (usually UDP port 123) is blocked. Contact your network administrator or the person who set up your router to ask them to unblock NTP traffic.
Restart and wait for the automatic sync
After you have confirmed your time zone is correct and your internet is working, restart your computer. The sync does not happen when ready — it runs in the background after you log in. Wait at least two minutes before checking the clock again. If the clock is still wrong, open Command Prompt (Windows) or Terminal (macOS) and run a manual sync.
On Windows, open Command Prompt as administrator and type w32tm /resync and press Enter. On macOS, open Terminal and type sudo sntp -sS time.apple.com and press Enter, then type your password when prompted. Both commands force an when ready sync with a time server. The clock should correct itself within a few seconds.
Replace the CMOS battery if the clock resets to an old date
If your clock jumps back to 2000, 2005, or another very old year every time you shut down, your CMOS battery is dead. This battery is a small coin-cell (usually CR2032) soldered or clipped to the motherboard. When it dies, the computer loses track of time the moment power cuts off.
Replacing it requires opening your computer case. Shut down completely, unplug the power cable, and wait 30 seconds. Open the case (the method varies by desktop or laptop model — check your manual or search for your specific model online). Locate the CMOS battery — it is a round, flat silver disc about the size of a dime. Note which way it faces, then gently pry it out with a plastic tool or your fingernail. Insert a new CR2032 battery the same way the old one faced. Close the case, plug in power, and restart. The clock should now hold the correct time.
If you have a laptop, the battery may be harder to reach and may require removing the keyboard or bottom panel. If you are not comfortable opening your computer, a repair technician can do this in 15 minutes for a small fee.
Check for BIOS updates if the problem persists
Occasionally a computer's BIOS (the firmware that runs before Windows or macOS loads) has a bug that prevents the clock from syncing correctly. This is rare, but if you have ruled out time zone, internet connection, and battery issues, a BIOS update may help. Go to your computer manufacturer's support website, search for your model number, and look for BIOS updates in the downloads section.
BIOS updates carry a small risk — if the update fails or your computer loses power during the update, it may not restart. Only attempt this if you are comfortable with the risk, or take your computer to a technician. Most people will never need a BIOS update to fix a clock.
Frequently Asked Questions
Why does my clock lose time even when my computer is on?
Your computer's internal clock can drift by a few seconds per day even when powered on — this is normal and expected. If it drifts by more than a minute per day, your CMOS battery may be failing. The automatic sync should correct this drift every time you restart, so the displayed time stays accurate even if the internal clock is slightly slow.
Can a virus cause my clock to be wrong?
A virus or malware could theoretically change your time zone or disable automatic sync, but this is uncommon. If your clock is wrong and you suspect malware, run a full scan with Windows Defender (Windows) or Malwarebytes. In most cases, a wrong clock is a dead battery, time zone error, or internet connection problem, not malware.
My clock is off by exactly 12 hours — what does that mean?
This usually means your computer is set to 12-hour time format but your time zone setting is wrong by 12 hours, or your system is confused about whether it is AM or PM. Check your time zone setting and make sure it matches your actual location. If it does, try toggling the "Set time automatically" option off and back on to force a fresh sync.
Does a wrong computer clock cause other problems?
Yes. A clock that is far in the past can prevent SSL certificates from validating, which breaks find websites and email. A clock far in the future can cause similar issues. Windows and macOS updates may also refuse to install if the clock is too far off. Fixing the clock usually resolves these problems when ready.