Your computer clock drifts because the internal battery that powers it is dying, your system time settings are misconfigured, or your computer lost its internet connection and cannot sync to the correct time
Every computer has two clocks. One is the system clock — the time Windows or macOS displays — which runs on a small coin-shaped battery inside your machine called the CMOS battery (or RTC battery). The other is the network time, which your computer can fetch from the internet. When your clock is wrong, one of these two has failed or disconnected.
The most common cause is a dying CMOS battery. This battery lasts three to ten years depending on your computer's age and how often you use it. When it fails, your clock resets to a default date (often 2000 or 2010) every time you shut down. The second most common cause is that your computer cannot reach a time server on the internet — either because your network is down, your firewall is blocking it, or your system time is so far off that the connection fails. A third cause is that you have manually set the time wrong, or your time zone setting is incorrect.
Key Takeaways
- If your clock resets to the same wrong time every time you restart, your CMOS battery is likely dead and needs replacement by a technician or at a repair shop.
- If your clock drifts slowly throughout the day, your computer is not syncing to a time server and you should check your internet connection and firewall settings.
- Windows and macOS both have built-in tools to sync your clock to the internet, and turning this on usually fixes the problem within minutes.
- Your time zone setting must match your location for the clock to display the correct time, even if the system time itself is accurate.
Check Your Internet Connection First
Before you open any settings, make sure your computer is connected to the internet. Your system can only sync to a time server if it can reach one. Open your web browser and visit any website — if the page loads, your connection is working. If it does not, reconnect to your network and try again.
If your connection is working but your clock is still wrong, your firewall or antivirus software may be blocking the time sync. Most firewalls allow this traffic by default, but custom rules can block it. Check your firewall settings and make sure port 123 (NTP, the protocol that syncs time) is not blocked. If you are unsure how to do this, restart your computer in Safe Mode with Networking, which disables most third-party security software. If your clock is correct in Safe Mode, your firewall or antivirus is the culprit.
Sync Your Clock to the Internet on Windows
Windows has a built-in time sync tool. Right-click the clock in the bottom right corner of your screen and select Adjust date and time. Look for a button or toggle that says Sync now or Set the time automatically. Click it. Windows will contact a time server and update your clock within seconds.
If the sync button does nothing or is greyed out, open Settings (press Windows key + I), go to Time & language, then Date & time. Make sure Set time automatically is turned on. If it is already on, turn it off, wait five seconds, then turn it back on. This forces Windows to re-sync. If the toggle will not turn on, your firewall is likely blocking the connection — check your antivirus or firewall settings.
After syncing, check that your time zone is correct. In the same Date & time settings, look for Time zone and make sure it matches your location. If you travel frequently or use a VPN, your computer may have set the wrong zone automatically.
Sync Your Clock to the Internet on macOS
On a Mac, click the Apple menu in the top left, select System Settings (or System Preferences on older versions), then go to General and Date & Time. Look for a checkbox that says Set date and time automatically and make sure it is checked. If it is already checked, uncheck it, wait a few seconds, then check it again to force a sync.
Below that, verify that your time zone is set correctly. macOS usually detects this from your location, but if you have disabled location services or use a VPN, it may be wrong. Select the correct time zone from the dropdown. After you have done this, your clock should update within a minute.
What to Do If Your Clock Resets Every Time You Restart
If your clock shows the correct time while your computer is on, but resets to the same wrong time (like January 1, 2010) every time you shut down and restart, your CMOS battery is dead. This battery is a small coin-shaped cell inside your computer case, and it keeps the system clock running when the power is off. When it dies, the clock has no power and resets to its default.
Replacing a CMOS battery requires opening your computer case. On a laptop, this usually means removing the bottom panel. On a desktop, you open the side panel. The battery is straightforward to spot — it looks like a watch battery and sits on the motherboard. You can buy a replacement (usually a CR2032 battery) for a few dollars at any pharmacy or electronics store. Push the old battery out, push the new one in, and close the case. Your clock should now keep time correctly.
If you are not comfortable opening your computer, take it to a repair shop. This is a quick job and usually costs between $20 and $50 in labor. Do not ignore this problem — a dead CMOS battery can cause other issues over time, such as failed Windows updates or BIOS errors.
Check Your System Time If Sync Is Not Working
If your clock is so far off that Windows or macOS cannot sync it, you may need to set the time manually first. Right-click the clock and select Adjust date and time (Windows) or open System Settings > Date & Time (macOS). Look for an option to edit the date and time by hand. Set it to something close to the correct time — it does not have to be exact. Then turn on automatic sync. Your computer should fine-tune it from there.
This usually only happens if your CMOS battery is dying and your computer has been off for a long time, or if you have been using your computer in a different time zone for weeks without updating the setting.
When to Call a Technician
If you have turned on automatic time sync, checked your internet connection, verified your firewall is not blocking port 123, and your clock is still wrong, you likely have a hardware problem. A dead CMOS battery is the most common cause, but a failing motherboard or a corrupted system file can also cause this. A technician can diagnose the problem in minutes and replace the battery if needed.
If your clock keeps drifting even after syncing — gaining or losing several minutes per day — your computer's internal clock crystal may be failing. This is rare but does happen on older machines. A technician can confirm this and advise whether repair is worth the cost.
Frequently Asked Questions
Why does my clock show the right time in Windows but the wrong time in my web browser?
Your web browser may be using a cached time from before you synced your system clock. Close the browser completely and reopen it. If the time is still wrong in the browser but correct in Windows, clear your browser cache or try a different browser to rule out a browser-specific issue.
Can a virus make my computer clock wrong?
Malware can change your system time or disable automatic sync, but it is rare. If you suspect a virus, run a full scan with Windows Defender (Windows) or Malwarebytes (both platforms). A wrong clock alone is not a reliable sign of infection — a dead battery or firewall block is far more likely.
My clock is correct but my emails show the wrong time. What is wrong?
Your email client may be using a different time zone than your system, or your email account settings may be storing a cached time. Check your email client's preferences and make sure the time zone matches your system. If the problem persists, sign out and sign back in to your email account.
Does a wrong computer clock affect anything besides the time display?
Yes. A clock that is far off can break SSL certificates (making websites appear unsafe), prevent Windows updates from installing, cause file timestamps to be wrong, and interfere with scheduled tasks. This is why fixing it matters beyond just seeing the correct time on your screen.
What if my computer clock is right but my phone shows a different time?
Your phone and computer are syncing to different time servers or are in different time zones. Check that both devices have automatic time sync turned on and that both are set to the same time zone. If they are, the small difference is normal — time servers are not perfectly synchronized, and a few seconds of drift is acceptable.