macOS High Sierra: Incorrect Date Error

macOS High Sierra: Incorrect Date Error

We have come across this problem quite often. It can happen if battery goes flat or has been disconnected.

You may have just fitted a new battery or upgraded your hard drive or SSD, and now can’t get past this error when trying reinstall or recover macOS.

When trying to install macOS from a USB you will get following error: 

“macOS could not be installed on your computer. No packages were eligible for install. Contact the software manufacturer for assistance. Quit the installer to restart your computer and try again. “

or

It can also happen when using macOS Recovery and you will get an error: 

“The recovery server could not be contacted.”

Why does this happen?

Unlike most Windows laptops, Apple MacBook, MacBook Pro and MacBook Air do not have a CMOS backup battery that will keep the date and time updated. Early Apple laptops had a PRAM battery but this was eliminated since the MacBook Unibody was introduced. 

MacBook laptops rely on battery or external power or else the time will reset. When laptop is connected to power and turned on, it will automatically update the time if internet connection is available. This option is selected by default under Date & Time in System Preferences.

Setting the date and time in terminal is simple once you understand the format that is used.

You can check if the date is correct by just typing following command in terminal:

    date

If the date or time is incorrect you can set it correctly by using the following format:

date [month][day][hour][minute][year]

Every bracket should be replaced with a two digit number.

For example, if you want to set the date and time to 3rd September 2018, 5:46pm, you will type the type the following command:

    date 0903174618

As you can see you need to use 24-hour clock format for the time, 5:46pm becomes 1746, and 3rd September 2018 becomes 03, 09 and 18 respectively.

If you type the date command in terminal again, you will see the date and time will now be set correctly.

Now macOS should hopefully install without any errors!