If you try to run Microsoft Azure AZ commands using Azure CLI you receive a time zone error message as shown below.
The command failed with an unexpected error. Here is the traceback: 0. The ID token is not yet valid. Make sure your computer's time and time zone are both correct
To fix the problem, from a WSL 2 terminal, run the following command.
sudo hwclock -s
If the above command is not fixing the problem, run the following command from a PowerShell terminal.
If you try and run another Az CLI command, you won’t receive any error message.