Your computer's time drifts because the internal clock battery is dying, the system hasn't synced with a time server, or your timezone settings are incorrect
A computer keeps time using a small battery-powered chip called the CMOS battery, which runs even when the machine is off. When that battery weakens—usually after three to ten years—the clock loses track of the date and time. If your computer is on and connected to the internet, Windows or Mac should automatically sync with a time server every so often, but that sync can fail if your internet connection drops, your firewall blocks it, or the sync service itself is turned off. A third common cause is that your timezone setting drifts out of sync with your actual location, especially after a system update or if you travel.
The fix depends on which of these three problems you have. Start by checking whether your computer is set to sync automatically—that solves most cases in under a minute. If syncing is already on, the battery may be failing, which means a trip to a repair shop or a replacement if you're comfortable opening the case. If you've recently moved or your computer thinks it's in a different timezone, you can reset that in your system settings right now.
Key Takeaways
- Windows and Mac both have an automatic time sync feature that should keep your clock correct as long as your internet connection is stable.
- If automatic sync is turned off, turning it back on will fix the time in most cases within a few minutes.
- A dying CMOS battery causes the clock to reset to a wrong date every time you restart, and it requires either a repair shop visit or opening the case yourself.
- Timezone settings can drift after updates or travel, and resetting them takes less than a minute in your system settings.
- If the time is only wrong in one program (like your email client), the problem is usually that program's settings, not your computer's clock.
Turn on automatic time sync in Windows
Windows 10 and 11 have a built-in sync service that talks to Microsoft's time servers multiple times per day. If it's turned on, your clock should stay within a few seconds of the correct time. To check whether it's running, right-click the time in your taskbar (bottom right corner) and select Adjust date and time. This opens the time settings panel.
Look for the toggle labeled Set time automatically. If it's already on (the toggle will be blue or green), your sync is active. If it's off, click it to turn it on. Windows will then contact a time server and update your clock. Wait a few seconds and check whether the time has changed. If it has, you're done—the sync is working. If the time still looks wrong after waiting a minute, move to the next section.
You can also manually sync by clicking Sync now (in Windows 11) or Update now (in Windows 10), which appears below the automatic sync toggle. This forces an when ready update without waiting for the next scheduled sync.
Turn on automatic time sync on Mac
macOS syncs time automatically by default, but the setting can be turned off if you've disabled it or if an update changed it. Click the Apple menu in the top left, then select System Settings (or System Preferences on older versions). Navigate to General, then Date & Time.
Look for the checkbox labeled Set date and time automatically. If it's checked, automatic sync is on. If it's unchecked, click it to enable sync. Your Mac will then contact Apple's time servers and update the clock. If the time still appears wrong after a minute, check the timezone setting in the same panel—it should match your actual location.
On some older Macs, this setting is in System Preferences under Date & Time instead. The process is the same: look for the automatic sync checkbox and make sure it's enabled.
Check and correct your timezone setting
Even if your computer is synced to the correct time, it will display the wrong time if your timezone is set incorrectly. This often happens after traveling, after a system update, or if you moved to a different region. On Windows, open Adjust date and time (right-click the taskbar clock) and scroll down to Time zone. The dropdown should show your current timezone—for example, Eastern Standard Time or Pacific Standard Time. If it's wrong, click the dropdown and select the correct one.
On Mac, open System Settings > General > Date & Time and look at the Time zone section. Click the dropdown and search for your city or timezone. Select the correct one, and the displayed time will update when ready.
If you're not sure which timezone you're in, search online for "current timezone [your city]" and match it to the list. The timezone name usually includes a major city in that region—for example, America/New_York or Europe/London.
Restart your computer and check the time again
After turning on automatic sync and confirming your timezone, restart your computer. This clears any temporary glitches and forces a fresh sync with the time server. Shut down completely (don't just sleep), wait ten seconds, and turn it back on. Once it boots up, check the time again.
If the time is now correct and stays correct for several hours, the problem is solved. If the time resets to the same wrong value every time you restart—for example, always showing a date from three years ago—your CMOS battery is likely failing and needs replacement.
Signs your CMOS battery is dying
The CMOS battery is a small coin-shaped cell inside your computer that keeps the clock running when the power is off. When it fails, the clock resets to a default date (often January 1, 2000, or the date the computer was manufactured) every time you restart. You'll notice this pattern: the time is correct while the computer is on, but after you shut down and turn it back on, it's wrong again.
If this is happening, the battery needs replacement. On a laptop, this usually requires opening the case or taking it to a repair shop. On a desktop, you can often access the battery yourself if you're comfortable opening the case—it's typically a CR2032 battery that costs five to fifteen dollars. Look up your specific computer model online to find the battery location and removal steps. If you're not comfortable doing this, a repair shop can replace it in under an hour for thirty to eighty dollars, depending on your location and the computer type.
Until you replace the battery, you can work around the problem by manually setting the time each time you restart, but this is inconvenient and can cause issues with security certificates and file timestamps. Replacement is the real fix.
Check if the problem is only in one program
Sometimes the time appears wrong only in a single program—like your email client, web browser, or calendar app—while your system clock is correct. This usually means that program has its own timezone setting or is caching an old time value. Check your system clock first by clicking the time in your taskbar or menu bar. If the system time is correct, the problem is with the program, not your computer.
To fix it, try closing and reopening the program. If that doesn't work, check the program's settings for a timezone or time format option. Some programs like Outlook or Thunderbird have their own timezone settings that override your system timezone. You can also try restarting your computer, which often clears cached time data in programs. If the problem persists, uninstall and reinstall the program—this usually resets its internal time settings to match your system.
Frequently Asked Questions
Why does my time reset every time I restart my computer?
This is a sign that your CMOS battery is failing. The battery keeps the clock running when your computer is off. When it dies, the clock resets to a default date each time you power on. You'll need to replace the battery—it's a small coin-shaped cell that costs five to fifteen dollars and takes a repair shop under an hour to install.
My time is correct, but it's off by a few hours. What's wrong?
Your timezone setting is incorrect. Open your date and time settings and check the timezone dropdown. It should match your actual location. If you've recently traveled or moved, update it to your current timezone. The time will correct itself when ready.
I turned on automatic sync, but my time is still wrong. What else can I try?
Restart your computer completely—don't just sleep it. If the time is still wrong after restart, check whether your internet connection is stable; sync requires a working connection. If your connection is fine, your CMOS battery may be failing, especially if the time resets to the same wrong value every time you restart.
Can a virus or malware cause my computer's time to be wrong?
Malware can disable automatic time sync or change your timezone setting, but it's rare. If you suspect malware, run a full scan with Windows Defender (Windows) or Malwarebytes. More commonly, a wrong time is caused by a dying battery, disabled sync, or an incorrect timezone setting—check those first.
My laptop time is wrong only when it's unplugged. Why?
When your laptop is unplugged for extended periods, the CMOS battery drains faster, especially if the battery is old. Plug it in and let it charge for a few hours, then restart. If the time stays correct after that, the battery is weak but still functional. If the problem returns, the battery needs replacement.