首页 > 代码库 > 树莓派设置NTP同步

树莓派设置NTP同步

pi@raspberrypi:~ $ sudo timedatectl set-ntp true--------------启用NTP
pi@raspberrypi:~ $ date                          ------------查看系统当前时间
Sun 11 Jun 04:08:25 UTC 2017-------------------------显示的是世界标准时间UTC,中国是UTC+8,因此需要修改时区
pi@raspberrypi:~ $ dpkg-reconfigure tzdata--------------修改为香港的时区,依次选择Asia→HongKong
/usr/sbin/dpkg-reconfigure must be run as root
pi@raspberrypi:~ $ 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同步