Need to set the date to your local time on a Raspberry Pi, Ubuntu Linux, or really most any variant of Linux? Here’s how to get it done: type the following at the command prompt:
This will show you the current date and time like so:
Wed 20 Feb 22:53:10 UTC 2019
sudo ln -sf /usr/share/America/Denver /etc/localtime
This will create a symbolic link, and if you need to set it to somewhere other than Denver Colorado, lol, just type it out to the slash before “America” and hit tab to find your region and locale. The -s is what takes care of making the symbolic link for you, and the f removes the existing destination file, making it all permanent. The sudo command will bump up your privileges to execute the command, and you will be asked for the root password.