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:

image

  • Use the following command to list available timezones: timedatectl list-timezones You should be able to find the Pacific/Auckland timezone 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 timedatectl and date, should say NZST as the timezone

image

  • 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

image