This sample is using CentOS7 .
Step1
Firstly, use this command to get the timezones list and press "enter" key
timedatectl list-timezones
Step2
Then you will get a list of timezone, remember the timezone string you need. For example, if i want to set the timezone to Hong Kong, I mark down the line 9 "Asia/HongKong" :Step 3
Use the command "timedatectl set-timezone " and add the string you just mark down. There is sample command:timedatectl set-timezone Asia/Hong_Kong
Step 4
After used the command at step3, you can use command "date" to check is the server's time same as what you expected :date
No comments :
Post a Comment