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

成都創(chuàng)新互聯(lián)公司成立于2013年,先為高坪等服務(wù)建站,高坪等地企業(yè),進(jìn)行企業(yè)商務(wù)咨詢服務(wù)。為高坪企業(yè)網(wǎng)站制作PC+手機(jī)+微官網(wǎng)三網(wǎng)同步一站式服務(wù)解決您的所有建站問(wèn)題。
GPS 系統(tǒng)中有兩種時(shí)間區(qū)分,一為UTC,另一為L(zhǎng)T(地方時(shí))兩者的區(qū)別為時(shí)區(qū)不同,UTC就是0時(shí)區(qū)的時(shí)間,地方時(shí)為本地時(shí)間,如北京為早上八點(diǎn)(東八區(qū)),UTC時(shí)間就為零點(diǎn),時(shí)間比北京時(shí)晚八小時(shí),以此計(jì)算即可。
購(gòu)買了Linux VPS,centos系統(tǒng),發(fā)現(xiàn)服務(wù)器時(shí)間與北京時(shí)間往往不一致,存在時(shí)差??梢酝ㄟ^(guò)運(yùn)行命令tzselect然后輸入選項(xiàng)前面的數(shù)字來(lái)一步一步地設(shè)置當(dāng)前系統(tǒng)時(shí)區(qū)。
可以執(zhí)行tzselect命令按提示更換時(shí)區(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(當(dāng)前用戶生效)
2.退出重新登錄即可,也可執(zhí)行source /etc/profile或source ~/.bash_profile立即生效
3.這時(shí)候再執(zhí)行date查看日期就可以發(fā)現(xiàn)時(shí)區(qū)改為北京時(shí)間啦。
經(jīng)過(guò)以上步驟,我們的CentOS Linux系統(tǒng)時(shí)間和計(jì)算機(jī)硬件時(shí)間終于都是CST時(shí)間了,并且都是北京時(shí)間。
文章標(biāo)題:CentOS系統(tǒng)將UTC時(shí)間修改為CST時(shí)間方法
文章來(lái)源:http://m.5511xx.com/article/ccddsph.html


咨詢
建站咨詢
