ARM Linux 设置时间

来源:互联网 发布:济南整站优化方案 编辑:程序博客网 时间:2024/06/07 06:26

1.ntp获取网络时间,此处使用上海交大的NTP

# ntpdate 202.120.2.101
使用域名也是可以的
# ntpdate ntp.sjtu.edu.cn

返回

 8 May 01:27:56 ntpdate[1597]: adjust time server 202.120.2.101 offset 0.005679 c

则成功了

2.查看下当前时间是否在正确了

# date

返回

Fri May  8 01:28:58 UTC 2015

3.写入硬件时间

# hwclock --systohc

4.查看硬件时间

# hwclock

返回

Fri May  8 01:31:02 2015  0.000000 seconds

0 0