To set the timezone in CentOS or Ubuntu, do the following:
timedatectl set-timezone Africa/Johannesburg
Other useful date time commands
This one shows information compared to time sync:
timedatectl
Check if ntp service is running:
service ntp status
Install a more sophisticated time server service:
apt install ntp
1 thought on “How to set the timezone in Ubuntu and CentOS and some other useful time commands”
great