The fastest way to fix your computer's clock

The quickest fix is to let your computer sync with the internet automatically. Open your system settings, find the date and time section, and turn on automatic synchronization — Windows calls this "Set time automatically," and macOS calls it "Set date and time automatically." Your computer will pull the correct time from a time server and fix itself in seconds.

If automatic sync is already on but your clock is still wrong, your computer may have lost internet connection or the time server may be unreachable. Restarting your computer often solves this. If the time drifts again after a few days, your computer's internal clock battery may be failing — that is a hardware issue that requires a technician.

Key Takeaways

  • Automatic time synchronization is the standard fix: turn it on in Settings and your computer syncs with an internet time server.
  • If automatic sync is on but the time is still wrong, restart your computer and check your internet connection.
  • Manual time entry works if you need to set the time right now, but automatic sync should be your default.
  • If your clock drifts by hours within days even with automatic sync on, the internal battery that keeps time when powered off may be failing.
  • You do not need administrator permission to change the time on your own computer, but you do need it on a work or school machine.

How to turn on automatic time sync on Windows

Open Settings by pressing the Windows key and typing "Settings," then select the Settings app. Go to Time & language in the left sidebar, then click Date & time. Under "Time," toggle Set time automatically to the on position. Windows will when ready contact a time server and correct your clock.

If you see a message that automatic sync is unavailable, your internet connection may be down or your network is blocking the time server. Restart your computer and try again. If the toggle is grayed out, you may not have administrator permission on this machine — contact your IT department if this is a work computer.

How to turn on automatic time sync on macOS

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 Date & Time. Check the box next to Set date and time automatically. Your Mac will sync with Apple's time servers when ready.

If the checkbox is grayed out, click the lock icon at the bottom left of the window and enter your password to unlock settings. If automatic sync still will not turn on, restart your Mac and try again. A persistent failure usually means your internet connection is unstable or your Mac's internal clock battery is wearing out.

Setting the time manually if you need to

If automatic sync is not working and you need the correct time right now, you can set it by hand. On Windows, go to Settings > Time & language > Date & time, turn off Set time automatically, and click Change under "Set the date and time." Type in the correct date and time, then click Change again. On macOS, go to System Settings > General > Date & Time, click the lock to unlock, and type the date and time directly into the fields.

Manual entry is a temporary fix. Turn automatic sync back on as soon as your internet is working again, because manual time will drift over days and weeks. If you find yourself setting the time by hand repeatedly, the underlying problem is either a broken internet connection or a failing internal clock battery.

Why your computer's time keeps drifting

Every computer has an internal clock that runs on a small battery even when the machine is powered off. This battery keeps time for years under normal conditions, but it can fail. If your clock loses or gains several hours within a few days, even with automatic sync turned on, the battery is likely dying.

A failing clock battery is not an emergency — your computer will still work normally. But the time will be wrong every time you restart, and some programs that depend on accurate time (like security certificates or backup software) may stop working. A technician can replace the battery, which is inexpensive but requires opening the machine. On laptops, this is usually a 30-minute job. On desktops, it takes even less time.

What to do if automatic sync is on but the time is still wrong

First, restart your computer completely — not sleep mode, but a full shutdown and restart. Many time sync problems resolve after a restart because the connection to the time server was interrupted.

Next, check your internet connection. Open a web browser and visit any website to confirm you are online. If you are not connected, connect to your network and try automatic sync again. If you are on a work or school network, the firewall may be blocking access to time servers — contact your IT department.

If your internet is working and you have restarted, but the time is still wrong, wait a few minutes and check again. Sometimes the time server takes a moment to respond. If the time is correct after waiting, the problem is solved. If it is still wrong after 10 minutes, your computer may have a hardware issue with its internal clock.

Frequently Asked Questions

Do I need to be an administrator to change the time on my computer?

On your own personal computer, no. On a work or school machine, yes — you will need administrator permission, which your IT department controls. If you cannot turn on automatic sync, contact your IT support.

Will changing the time break anything on my computer?

Changing the time once will not break anything. But if your clock is consistently wrong, some programs may stop working — security certificates can expire if the date is too far in the past, and backup software may refuse to run. Turn on automatic sync to prevent this.

What is a time server and why does my computer need one?

A time server is a computer on the internet that broadcasts the correct time. Your computer contacts it periodically to check whether its internal clock has drifted and corrects itself if needed. This keeps your time accurate without you having to do anything.

Can I change the time zone without changing the actual time?

Yes. On Windows, go to Settings > Time & language > Date & time and scroll down to "Time zone" — change it without touching the date and time fields above. On macOS, go to System Settings > General > Date & Time and click the time zone dropdown. The actual time stays the same; only the display changes.

Why does my computer show the wrong time when I first turn it on?

Your computer's internal clock battery is likely failing. When the machine is off, the battery keeps time. If it is weak, the clock loses accuracy. Once you turn the computer on and automatic sync connects to the internet, it corrects itself. But the problem will return after the next restart. Have a technician check the battery.