天天看點

修正redhat linux時區設定錯誤

修正redhat linux時區設定錯誤

在一個伺服器上,打開另一個伺服器生成的tar包,顯示提示:檔案是将來的時間:

tar: time stamp 2017-02-07 17:44:58 is 14509.233807047 sin the future

# date
Tue Feb   ::EST 
cat /etc/sysconfig/clock

# The ZONE parameter is only evaluated bysystem-config-date.
# The timezone of the system is defined by the contents of/etc/localtime.
ZONE="America/New_York"
UTC=true
ARC=false
           

這是時區錯誤造成的,本伺服器時區是紐約,而另一個伺服器是上海

做如下操作,修改時區:

cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
reboot
重新開機後顯示:
# date
Tue Feb   ::CST 
           

歡迎交流,有問題可聯系 QQ: 83555727 或Email [email protected]

繼續閱讀