Your computer's clock drifts because the battery that powers it is dying, your system time settings are misconfigured, or your internet connection is preventing automatic updates
A computer keeps time using a small coin-cell battery on the motherboard called a CMOS battery. When that battery weakens, the clock loses track of the date and time the moment you shut down. If you restart and the time has jumped backward or forward by hours or days, the CMOS battery is usually the culprit. On newer machines, the clock may also be wrong because your system is set to the wrong time zone, the automatic time synchronization is turned off, or your internet connection is too unstable for Windows or macOS to reach the time server.
The fix depends on which of these is happening. Most of the time, you can correct it yourself in settings without opening the computer. If the clock keeps resetting after you fix it, the CMOS battery needs replacement—a task a repair shop can handle in under an hour.
Key Takeaways
- If the time resets every time you restart, your CMOS battery (a small battery on the motherboard) is likely dead and needs replacement by a technician.
- If the time is straightforward wrong but stays wrong after restart, check that your time zone is set correctly and that automatic time synchronization is turned on.
- Windows and macOS both sync your clock to internet time servers automatically, but this only works if your internet connection is stable and the service is enabled.
- Manually setting the time works as a temporary fix, but if the clock drifts again within hours or days, a hardware issue is the real problem.
Check Your Time Zone Setting First
The most common reason a clock shows the wrong time is that your time zone is set incorrectly. Your computer may be set to Pacific time when you are on the East Coast, or to a time zone on the other side of the world entirely. This is especially common after a fresh Windows installation or if you moved and never updated the setting.
On Windows 11, go to Settings > Time & language > Date & time. Look at the line that says Time zone. Click the dropdown and select the correct zone for your location. On macOS, go to System Settings > General > Date & Time and check the Time zone dropdown. Once you set it correctly, the clock should jump to the right time within a few seconds.
Turn On Automatic Time Synchronization
Both Windows and macOS can sync your clock to internet time servers automatically. This keeps your time accurate even if your computer's internal clock drifts slightly. If this feature is turned off, your clock will slowly fall behind or race ahead.
On Windows 11, open Settings > Time & language > Date & time and look for the toggle labeled Set time automatically. It should be on (blue). Below that, make sure Set time zone automatically is also on. On macOS, go to System Settings > General > Date & Time and check the box next to Set date and time automatically. If either of these was off, turn it on and restart your computer.
Manually Sync Your Clock to the Internet
If automatic synchronization is on but your clock is still wrong, you can force a manual sync. This tells your computer to contact the time server right now instead of waiting for the next automatic update.
On Windows 11, open Settings > Time & language > Date & time and scroll down to Additional settings. Click Sync now. Your clock should update within a few seconds. On macOS, there is no manual sync button in the settings. Instead, open Terminal (search for it in Spotlight), type sntp -sS time.apple.com, and press Enter. Your clock will sync to Apple's time server. If you see an error message, your internet connection may be blocking the sync—check that you are connected to the network and that no firewall is preventing outbound connections.
When the Clock Resets After Every Restart
If you fix the time, shut down your computer, and the clock is wrong again when you turn it back on, the CMOS battery on your motherboard is dead. This battery is a small coin-cell (usually CR2032 size) soldered or clipped to the motherboard. It keeps the system clock running when the computer is powered off. When it dies, the clock loses all memory of the correct time.
This is not something you should attempt to replace yourself unless you are comfortable opening your computer and handling delicate electronics. A local repair shop can replace the CMOS battery in 30 minutes to an hour, usually for $50 to $150 depending on your location and machine type. Laptop CMOS batteries are sometimes harder to access than desktop ones, so labor costs may be higher. If your computer is still under warranty, contact the manufacturer first—they may cover the replacement.
Check Your Internet Connection
Automatic time synchronization requires a stable internet connection. If your network is unreliable or you are behind a corporate firewall that blocks outbound connections to time servers, your clock may not sync properly.
Make sure you are connected to your network and that other internet services (email, web browsing) are working. If you are on a corporate network, ask your IT department whether they block connections to time servers like time.nist.gov or pool.ntp.org. Some workplaces run their own internal time server and require you to sync to that instead. If you are on a home network and the sync still fails, restart your router and try again.
Temporarily Set the Time Manually
If you need the correct time right now and automatic sync is not working, you can set it by hand. On Windows 11, go to Settings > Time & language > Date & time, scroll down, and click Change under Set the date and time. A dialog will open where you can type in the correct date and time. On macOS, go to System Settings > General > Date & Time, click the lock icon to unlock it, and type in the correct date and time.
This is a temporary fix. If the clock drifts again within hours or days, the underlying problem is either a dead CMOS battery or a network issue preventing synchronization. Do not rely on manual setting as a permanent solution.
Frequently Asked Questions
Why does my clock go backward when I restart?
Your CMOS battery is dead. The clock loses power when your computer shuts down and resets to a default date (often years in the past). This happens every time you restart until the battery is replaced. A technician can do this in under an hour.
Can a virus cause my clock to be wrong?
Malware can change your system time, but it is rare. More commonly, a virus disables automatic time synchronization so you do not notice the clock drifting. Run a full antivirus scan if you suspect malware, but check your time zone and synchronization settings first—that solves the problem 95% of the time.
What if my clock is off by exactly 12 hours?
Your system is set to the wrong time format (12-hour instead of 24-hour, or vice versa) or your time zone is set to the opposite side of the world. Check your time zone setting in Date & Time settings and make sure it matches your actual location.
Does a wrong clock affect my files or programs?
A wrong clock can cause problems with file timestamps, email, and security certificates, but it will not damage your files. However, some programs may behave strangely if the time is very far off. Fix it as soon as you can to avoid confusion with file dates and backup schedules.
Should I replace the CMOS battery myself?
Only if you are comfortable opening your computer and handling small electronics. The battery itself costs $5 to $15, but if you damage something inside the case, repair costs will be much higher. A repair shop is the safer choice.