If for some reason you are unable to change the Date & Time setting on your Mac – be it an error or a management profile restriction -, you might very well be locked out from the outside world as network connections rely heavily on the clock running sharp.
Open a Terminal and issue the following to trigger a manual NTP time sync with Apple’s time server – this assumes you are connected to the network in some for, either via Wi-Fi or Ethernet:
sudo sntp -Ss time.apple.com