Sometimes Apple needs your Mac to know exactly what time it is. Most people leave their Macs set to the default setting in which the time is set via a network server that keeps it up to date down to the second. But you may have turned that feature off, reset the clock manually to check something or prevent a date-based expiration, or have a hardware problem that’s causing a glitch. (Some Macs include long-lived battery cells designed to keep the clock ticking and preserve other settings.)
If your Mac doesn’t know the proper time, you may have trouble with your Apple ID and iCloud syncing, be unable to log in to the App Store or download updates, have your Mac say it can’t connect to servers when in macOS Recovery, or have the process fail for recovering a lost FileVault key when you’ve allowed it to be stored in your iCloud account.
If your Mac is up and running, use the Date & Time preference pane to check the time. You can enable automatic date/time setting if it’s off, or if it’s on and incorrect, disable it and set the clock manually. (If you unplug your desktop Mac and plug it back in and the clock is incorrect, you almost certainly need to replace its internal settings battery.)
When restoring your Mac or trying to access your FileVault recovery key with your Apple ID, things can be trickier.
The goal is to bring up Terminal, where you type in one of the following two commands. Terminal is an option in macOS Recovery in the Utilities menu.
If you can’t get the recovery mode to appear at all or bring up Terminal, create a bootable installer with a USB thumb drive or other external drive. (We have instructions on how to create a bootable installer for Big Sur and Catalina.) Booting from that drive, you should be able to access Terminal by choosing its Recovery partition—this may requiring holding down Option at startup to pick an individual disk that appears.
With a live Internet connection, in the Terminal try:
ntpdate -u time.apple.com
This contacts Apple’s time server directly and sets the clock. If you can’t establish an Internet connection or that doesn’t work, try using the date command, which is followed by the month, day, hour, minute, and year (last two digits), with zeroes padding single-digit entries. For example, March 12, 2020 at 9: 30 a.m. looks like this
In some cases, you may need to restart before the date and time fix are recognized and allow you to proceed.
If you can’t reach the Terminal app, you need to find an external drive for your Mac with macOS installed (or on which you can install macOS from another Mac), and you can then start up from it. You can use the preference pane to set the date and time or use Terminal once booted into macOS.
This Mac 911 article is in response to a question submitted by Macworld reader Paul.
Ask Mac 911
We’ve compiled a list of the questions we get asked most frequently along with answers and links to columns: read our super FAQ to see if your question is covered. If not, we’re always looking for new problems to solve! Email yours to firstname.lastname@example.org including screen captures as appropriate, and whether you want your full name used. Not every question will be answered, we don’t reply to email, and we cannot provide direct troubleshooting advice.
Note: When you purchase something after clicking links in our articles, we may earn a small commission. Read ouraffiliate link policyfor more details.