Created
June 3, 2015 01:55
-
-
Save coffeant/f9423821ea6c32ed76f8 to your computer and use it in GitHub Desktop.
ubuntu modify date timezone to china shanghai
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo tzconfig,如果命令不存在请使用 dpkg-reconfigure tzdata | |
然后按照提示选择 Asia对应的序号,选完后会显示一堆新的提示—输入城市名,如Shanghai或Chongqing,最后再用 sudo date -s “” 来修改本地时间 | |
sudo cp /usr/share/zoneinfo/Asia/ShangHai /etc/localtime 防止系统重启后时区改变 | |
sudo apt-get install ntpdate | |
设置系统时间与网络时间同步 ntpdate cn.pool.ntp.org | |
将系统时间写入硬件时间 hwclock -w :systohc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
谢谢大神的好帖子,我还是没有成功改变时间