AJCIT

Changing timezone in Linux terminal

Depending on what distro of linux you’re using you might not be offered to choose a timezone on install, potentially leaving you with an incorrect system time. This short tutorial will detail how to set your system time through bash.

First delete your localtime file, which stores your current timezone information.

rm /etc/localtime

Now find your timezone in the following directory

/usr/share/zoneinfo/

Create a symbolic link from your timezone to /etc/localtime

ln -s  /usr/share/zoneinfo/Pacific/Auckland /etc/localtime

Now running

date

Should show the correct time.

Wed Apr 26 08:10:02 NZST 2017