Setting the Date and Time for My Beaglebone Black

One of the things I noticed when I first powered-on my BBB and queried the command line for the date and time, was that both were nowhere near being the correct date and time. Using Google and some trial and error, I came to using the following commands:

sudo locale-get en_US.UTF-8
sudo timedatectl set-time “YYYY-MM-DD hh:mm:ss”

However, I found that after a power cycle the date and time were once more incorrect. So after more trial and error the set of commands I came to were the following:

sudo locale-get en_US.UTF-8
sudo timedatectl set-ntp 0
sudo timedatectl set-time “YYYY-MM-DD hh:mm:ss”

Things seemed to work, until a power cycle once more revealed the date and time were once again incorrect. Finally this week, after performing and update and upgrade of system packages on the BBB, the output of the update process dropped the best hint ever for solving my wrong date and time issue. From there, I typed the following command:

sudo dpkg-reconfigure tzdata

Followed the prompts, selected the country and time zone. Power cycled the BBB to verify the date and time would stick and they did. Relief.

P.S: My BBB is running:
Linux beaglebone 4.19.59-ti-rt-r26 #1buster SMP PREEMPT RT Thu Sep 5 01:03:08 UTC 2019 armv7l GNU/Linux