Where your computer gets the time from

Your computer does not keep perfect time on its own. Instead, it syncs with time servers — computers maintained by organizations like the National Institute of Standards and Technology (NIST) that broadcast the exact time across the internet. When you start your computer, it reaches out to one of these servers and sets its clock. If your computer's time is wrong, the first thing to check is whether this automatic sync is turned on.

Most of the time, if your clock is off by more than a few minutes, it means your computer has not synced recently — usually because it has been offline or because the sync service crashed. Restarting your computer often fixes this without you having to touch any settings.

Key Takeaways

  • Your computer normally syncs its time automatically with internet time servers, so check that this setting is turned on before changing the time manually.
  • On Windows, open Settings > Time & Language > Date & Time and toggle "Set time automatically" to on; on Mac, open System Settings > General > Date & Time and check "Set date and time automatically".
  • If automatic sync is on but your time is still wrong, restart your computer — it will re-sync on startup.
  • Changing the time manually should only be temporary; turn automatic sync back on as soon as you can, because many programs and security features depend on your clock being correct.
  • If your computer's time keeps drifting even with automatic sync on, your internal battery may be failing and needs replacement.

Checking if automatic time sync is on (Windows)

Open the Start menu and type "Settings" into the search box, then click Settings. In the left sidebar, click "Time & Language". On the right side, you will see a section called "Date & Time".

Look for the toggle labeled "Set time automatically". If it is already on (the toggle will be blue and pushed to the right), your computer is syncing with time servers and you should not need to change anything manually. If it is off, click it to turn it on. Windows will sync within a few seconds.

If the toggle is grayed out or you cannot click it, your computer may not have internet access. Check that you are connected to Wi-Fi or ethernet, then try again.

Checking if automatic time sync is on (Mac)

Click the Apple menu in the top left corner and select "System Settings". In the sidebar, click "General". Then click "Date & Time".

You will see a checkbox labeled "Set date and time automatically". If it is checked, your Mac is syncing with Apple's time servers. If it is unchecked, click it to turn automatic sync on.

On Mac, you may also see a dropdown menu for "Time zone". Make sure this is set to your actual location, not a neighboring zone. An incorrect time zone will make your clock show the wrong time even if the sync is working.

Changing the time manually on Windows

If you need to change the time right now — for instance, because automatic sync is not working and you have an appointment — you can set it by hand. First, turn off "Set time automatically" in the same Settings > Time & Language > Date & Time window described above.

Once you have turned off automatic sync, a new button labeled "Change" will appear below the current time. Click it. A small window will open showing the date and time. Click on the time field and type the correct time in the format shown (usually HH:MM AM/PM). Click "Change" to save it.

As soon as your computer can sync again, turn "Set time automatically" back on. Leaving it off for a long time can cause problems with email, security certificates, and Windows Update.

Changing the time manually on Mac

Uncheck "Set date and time automatically" in System Settings > General > Date & Time. A lock icon will appear next to the date and time fields.

Click the lock icon and enter your Mac password. The date and time fields will now be editable. Click on the time field and type the correct time. Click outside the field to save the change.

Turn automatic sync back on as soon as you can. Many Mac features — including Time Machine backups, iCloud sync, and security updates — rely on your clock being correct.

What to do if the time keeps drifting

If you turn automatic sync on but your computer's time keeps falling behind or jumping ahead, the problem is usually your computer's internal clock battery. Every computer has a small battery (called a CMOS battery on Windows machines, or a coin-cell battery on Macs) that keeps the clock running even when the computer is off. When this battery is dying, the clock loses time quickly.

If your computer is a laptop, the battery is usually soldered to the motherboard and requires a technician to replace. If it is a desktop, the battery is often a removable coin-shaped cell that you can replace yourself — search your computer model number plus "CMOS battery replacement" to find instructions specific to your machine.

Until you can replace the battery, turning on automatic sync will keep your clock correct while your computer is running and connected to the internet.

Why your computer's time matters

An incorrect system clock breaks more things than you might expect. Email clients use the time to sort messages. Web browsers use it to verify that security certificates are valid — if your clock is too far in the past or future, you will get warnings that websites are unsafe even when they are not. Windows Update will refuse to install patches if your clock is wrong. Some programs will not launch at all.

For this reason, always keep automatic sync turned on unless you have a specific reason to change the time temporarily. If you do change it manually, set a reminder to turn automatic sync back on.

Frequently Asked Questions

Why does my computer's time change by itself?

If automatic sync is on, your computer re-syncs with time servers every time it connects to the internet or wakes from sleep. This is normal and correct. If the time jumps by a large amount (more than a few minutes), it usually means your computer was offline for a while and is catching up to the correct time.

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

Yes. On Windows, go to Settings > Time & Language > Date & Time and scroll down to "Time zone". On Mac, go to System Settings > General > Date & Time and use the "Time zone" dropdown. Changing the zone will adjust what time is displayed, but it will not change the actual moment your computer thinks it is.

What if my computer says it cannot sync because the time is too far off?

Some computers will not sync if the clock is more than a few hours wrong, because the system thinks something is broken. Set the time manually to within an hour or two of the correct time, then turn automatic sync back on. The computer should sync the rest of the way automatically.

Does changing my computer's time affect my files or documents?

Changing the system time can affect the timestamps on files you create or modify while the wrong time is set. Files created during that period will show the incorrect date. This usually does not cause problems, but it can make it harder to find files later. Correct your clock as soon as you can.