Here is that TZ value again,this time on standard output so that youĬan use the /usr/bin/tzselect command in shell scripts:Īdd the line TZ='Asia/Shanghai' export TZ to /etc/profile (valid for all users) or ~/.bash_profile (valid for current users) To the file '.profile'in your home directory then log out and log in again. You can make this change permanent for yourself by appending the line Therefore TZ='Asia/Shanghai' will be used.
The following information has been given: Please select one of the following time zone regions.1) Beijing Time Please select a country.1) Afghanistan 18) Israel 35) Palestineĥ) Bangladesh 22)Korea(North)39) Saudi Arabiaġ2) Georgia 29) Malaysia 46) Turkmenistanġ3) Hong Kong 30) Mongolia 47) United Arab Emiratesġ4) India 31)Myanmar(Burma)48) Uzbekistan Please select a continent or ocean.1) Africaġ1) none - I want to specify the time zone using the Posix TZ format. Please identify a location so that time zone rules can be set correctly. You can execute the tzselect command to change the time zone as prompted, and select 5-Asia, 9-China, 1-Beijing Time in turn.
I bought a VPS and CentOS system and found that the server time is often inconsistent with Beijing time, and there is a time difference.