Description:
Based on the [Link] , the local time is configured by link of the file /etc/localtime
[Additional Link from digital ocean(Cofnigure timezone)]
Check local timezone
ls -l /etc/localtime
#Show output like below message, showing the /etc/localtime is linked with timezone file in zoneinfo
#/etc/localtime -> ../usr/share/zoneinfo/Asia/Hong_Kong
Find out timezone options
#Find out available timezeon, targeting to hong kong this time
timedatectl list-timezones | grep Hong_Kong
#Asia/Hong_Kong
Setup timezone
#Set timezone to the grep result
timedatectl set-timezone Asia/Hong_Kong
Verify
[root@host ~]# date
Fri Oct 11 02:05:11 HKT 2019
[root@host ~]# ls -l /etc/localtime
lrwxrwxrwx. 1 root root 36 Oct 11 01:56 /etc/localtime -> ../usr/share/zoneinfo/Asia/Hong_Kong
The timezone could be changed by directly link target timezone
#Backup the local before update
mv /etc/localtime /etc/localtime__
#Link the timezone under zoneinfo as /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Hong_Kong /etc/localtime
#Remove the /etc/localtime__
rm /etc/localtime__
Page:
Page:
Page:
Page: