Ubuntu 修改与恢复同步时间

2018年9月5日11:34:45

   (¦3[▓▓] 晚安

调整为UTC时间

6.  Set Timezone to UTC:
    $ sudo timedatectl set-timezone UTC
    You can set the system date with this command:
    Set date and time:
    $ sudo date --set="2018-09-30 10:05:59.990"
    Check it with the date command.
    $ date
    Set hardware clock in the BIOS of the system, that the setting persists over a reboot
    $ sudo hwclock --systohc
    Check it with the hwclock command.
    $ sudo hwclock
    Both hwclock and date should now show the same date and time.

恢复为本地时间

Setting -> date & Time -> Time Zone:CST

# 安装工具
sudo apt-get install ntpdate

# 同步时间
sudo ntpdate cn.pool.ntp.org  

# 写入硬盘
sudo hwclock --systohc
sudo hwclock

你可能感兴趣的:(Ubuntu)