1、硬件时钟设置
[root@mosdb ~]# hwclock
Sat 02 Feb 2013 09:00:33 AM CST -0.551757 seconds
[root@mosdb ~]# hwclock --set --date="02/03/13 17:51:00"
[root@mosdb ~]#
[root@mosdb ~]# hwclock
Sun 03 Feb 2013 05:51:05 PM CST -0.483683 seconds
[root@mosdb ~]#
2、OS时钟设置
[root@mosdb ~]# date
Sat Feb 2 09:00:33 CST 2013
[root@mosdb ~]#
[root@mosdb ~]# date -s "2013-02-03 17:40"
Sun Feb 3 17:40:00 CST 2013
[root@mosdb ~]#
3、同步设置
hwclock --help
--hctosys set the system time from the hardware clock
--systohc set the hardware clock to the current system time
[root@mosdb ~]# hwclock --systohc
[root@mosdb ~]#
[root@mosdb ~]# hwclock --hctosys
[root@mosdb ~]#
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/60144/viewspace-1060186/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/60144/viewspace-1060186/