1. 程式人生 > >樹莓派設置NTP同步

樹莓派設置NTP同步

pbe true figure allow ref 樹莓派 -- efault 設置

[email protected]:~ $ sudo timedatectl set-ntp true--------------啟用NTP
[email protected]:~ $ date ------------查看系統當前時間
Sun 11 Jun 04:08:25 UTC 2017-------------------------顯示的是世界標準時間UTC,中國是UTC+8,因此需要修改時區
[email protected]:~ $ dpkg-reconfigure tzdata--------------修改為香港的時區,依次選擇Asia→HongKong
/usr/sbin/dpkg-reconfigure must be run as root
[email protected]

:~ $ sudo dpkg-reconfigure tzdata

Current default time zone: ‘Asia/Hong_Kong‘ ----------------------修改成功
Local time is now: Sun Jun 11 12:10:37 HKT 2017.
Universal Time is now: Sun Jun 11 04:10:37 UTC 2017.

原文鏈接:

http://www.tuicool.com/articles/rauiqaf

參考鏈接:

http://shumeipai.nxez.com/2015/06/28/raspberry-pi-date-and-time-correction-method-allowed.html

樹莓派設置NTP同步