date  //查看系统时间



hwclock  //查看硬件时间  


设置服务器时间


安装utpdate工具

yum -y install utp ntpdate



设置系统时间与网络时间同步

ntpdate cn.pool.ntp.org



将系统时间写入硬件时间

hwclock --systohc

设置时间

date -s 20121019  

date -s 23:40:00  

没有网络的情况下可以用这个

2、ntpdate

ntpdate time.windows.com && hwclock -w  

连网更新时间,如果成功,将系统时间,写入BOIS

# 系统时间同步到硬件时间

hwclock -w 或 hwclock --systohc 【sys系统时间,tohc硬件时间】

# 硬件时间同步到系统时间

clock –hctosys 或 hwclock --hctosys【hc代表硬件时间,sys代表系统时间】