Choose Apple menu > System Preferences, then click Date & Time.
Click the lock icon in the corner of the window, then enter your administrator password to unlock the settings. (The settings are dimmed when locked.)
In the Date & Time pane, make sure that ”Set date and time automatically” is selected and your Mac is connected to the internet. Your Mac can then get the current date and time from the network time server selected in the adjacent menu.