通過(guò)date -s “2014-12-06 15:00:00”以及timedatectl set-time “2014-12-06 15:00:00” ,以及ntp等方式均知識(shí)臨時(shí)有效,苦惱了我半天。廢話少說(shuō),直奔主題。 Step 1:查看時(shí)間發(fā)現(xiàn)Local time不對(duì),而Asia/Shanghai是正確的。那么將本地時(shí)間設(shè)置為:Asia/Shanghai(世界標(biāo)準(zhǔn)時(shí)間)不就行了嘛。 Step 2:查看系統(tǒng)時(shí)區(qū)信息 [mdrill01@mdrill03 ~]$ ls /usr/share/zoneinfo/ Africa Chile GB Indian MST PRC UTC America CST6CDT GB-Eire Iran MST7MDT PST8PDT WET Antarctica Cuba GMT iso3166.tab Navajo right W-SU Arctic EET GMT0 Israel NZ ROC zone.tab Asia Egypt GMT-0 Jamaica NZ-CHAT ROK Zulu Atlantic Eire GMT+0 Japan Pacific Singapore Australia EST Greenwich Kwajalein Poland Turkey Brazil EST5EDT Hongkong Libya Portugal UCT Canada Etc HST MET posix UniversalCET Europe Iceland Mexico posixrules US [mdrill01@mdrill03 ~]$ Step 3:刪除當(dāng)前系統(tǒng)所處時(shí)區(qū): [mdrill01@mdrill03 ~]$ sudo rm /etc/localtime Step 4:從/usr/share/zoneinfo/中創(chuàng)建軟連接以替換當(dāng)前的時(shí)區(qū)信息,直接選擇Universal: [mdrill01@mdrill03 ~]$ sudo ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime [mdrill01@mdrill03 ~]$ Step 5:利用timedatectl查看,OK問(wèn)題解決。 [mdrill01@mdrill03 ~]$ sudo timedatectl Local time: Sat 2014-12-06 15:10:39 UTC Universal time: Sat 2014-12-06 15:10:39 UTC RTC time: Sat 2014-12-06 07:11:04 Timezone: Universal (UTC, +0000) NTP enabled: yes NTP synchronized: no RTC in local TZ: no DST active: n/a |
|