Based on the [Link] , the local time is configured by link of the file /etc/localtime
[Additional Link from digital ocean(Cofnigure timezone)]
Instructions
-
Check local timezone
1 2 3ls -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
1 2 3#Find out available timezeon, targeting to hong kong this time timedatectl list-timezones | grep Hong_Kong #Asia/Hong_Kong -
Setup timezone
1 2#Set timezone to the grep result timedatectl set-timezone Asia/Hong_Kong -
Verify
1 2 3 4[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
Without timezonectl
The timezone could be changed by directly link target timezone
|
|
Related articles
-
Page:
-
Page:
-
Page:
-
Page: