This is something I need quite often when I setup a new VPS or Virtual Machine in the cloud. I use multiple cloud infrastructures that includes Azure, Amazon AWS, DigitalOcean, CloudatCost and InterServer. All of them has pre-set Virtual Machine or ISO that you can simply deploy using a few clicks. Once the machines are up and running, they are either running on a US time zone or using UTC. It creates problem for me when I try to look up something in the lost and often I find it hard to relate my ConfigServer Security and Firewall or Nginx logs with local time. Changing timezone in Linux is pretty simple and it doesn’t affect any running applications.
First become root using
user@kali:~# sudo -s root@kali:~#
Then simply run the following command to reconfigure your timezone locale
root@kali:~# dpkg-reconfigure tzdata (or) user@ubuntu:~# sudo dpkg-reconfigure tzdata
If you don’t want to become root, then you can use this command with sudo as well.
This works for Ubuntu, Debian, Kali Linux or anything that is a Debian or Ubuntu variant.
Then it’s select the right Geographic Area such as Australia.
and TimeZone area such as Sydney.
That’s it. Once done, your terminal should show default update current time zone.