Change Timezone from UTC to NZT - KeegMitch/Operations-Engineering-group-c GitHub Wiki
As we found out while configuring cron jobs to configure backups, the default timezone in our ubuntu servers is in UTC, as shown using the timedatectl and date commands:
-
Use the following command to list available timezones:
timedatectl list-timezonesYou should be able to find thePacific/Aucklandtimezone as that's the one we're going to use -
Use the following command to set the timezone:
sudo timedatectl set-timezone Pacific/Auckland -
Check that the timezone has been updated by running
timedatectlanddate, should say NZST as the timezone
-
Restart the crontab service to apply to the new timezone:
sudo systemctl restart cron -
Check that cron service has "NZST" as well:
sudo systemctl status cron