新聞中心
世界協(xié)調(diào)時間(Universal Time Coordinated,UTC):

成都創(chuàng)新互聯(lián)公司成立于2013年,先為高坪等服務建站,高坪等地企業(yè),進行企業(yè)商務咨詢服務。為高坪企業(yè)網(wǎng)站制作PC+手機+微官網(wǎng)三網(wǎng)同步一站式服務解決您的所有建站問題。
GPS 系統(tǒng)中有兩種時間區(qū)分,一為UTC,另一為LT(地方時)兩者的區(qū)別為時區(qū)不同,UTC就是0時區(qū)的時間,地方時為本地時間,如北京為早上八點(東八區(qū)),UTC時間就為零點,時間比北京時晚八小時,以此計算即可。
購買了Linux VPS,centos系統(tǒng),發(fā)現(xiàn)服務器時間與北京時間往往不一致,存在時差??梢酝ㄟ^運行命令tzselect然后輸入選項前面的數(shù)字來一步一步地設置當前系統(tǒng)時區(qū)。
可以執(zhí)行tzselect命令按提示更換時區(qū),依次選擇5-Asia,9-China,1-Beijing Time。
Please select one of the following time zone regions.
1) Beijing Time
2) Xinjiang Time
#? 1
The following information has been given:
China
Beijing Time
Therefore TZ='Asia/Shanghai' will be used.
Local time is now: Sun Oct 28 11:12:54 CST 2018.
Universal Time is now: Sun Oct 28 03:12:54 UTC 2018.
Is the above information OK?
1) Yes
2) No
#? 1
You can make this change permanent for yourself by appending the line
TZ='Asia/Shanghai'; export TZ
to the file '.profile' in your home directory; then log out and log in again.
Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
Asia/Shanghai
1.將TZ='Asia/Shanghai'; export TZ這行添加到/etc/profile(所有用戶生效)或者~/.bash_profile(當前用戶生效)
2.退出重新登錄即可,也可執(zhí)行source /etc/profile或source ~/.bash_profile立即生效
3.這時候再執(zhí)行date查看日期就可以發(fā)現(xiàn)時區(qū)改為北京時間啦。
經(jīng)過以上步驟,我們的CentOS Linux系統(tǒng)時間和計算機硬件時間終于都是CST時間了,并且都是北京時間。
文章名稱:CentOS系統(tǒng)將UTC時間修改為CST時間方法
瀏覽地址:http://m.fisionsoft.com.cn/article/ccddsph.html


咨詢
建站咨詢
