通过Date来设置时间 如果硬件的时间不正确
设置也是无效的。需要设置硬件的时间:
hwclock 查看硬件时钟 此command 只有root能使用 一般user无法使用
更改硬件时钟
例:
hwclock --set --date="12/01/2007 10:45:34"
月 日 年 时 分 秒
同步系统时间和硬件时间
hwclock --hctosys
date用法
例:
date 120110552007.12
月 日时分 年 . 秒