linux 时间设置

date 命令:设置系统时间
date -s 25/12/2011
date -s 21:30:50
结果:2011年12月25日 21点30分50秒

hwclock 命令:
hwclock – query and set the hardware clock (RTC)(取得或设置硬件时间RTC)
Usage: hwclock [function] [options...]
Functions:
–help show this help(显示帮助)
–show read hardware clock and print result(显示硬件时间)
–set set the rtc to the time given with –date(使用–date参数指定的日期,设置硬件时间)
–hctosys set the system time from the hardware clock(将当前硬件时间设置为系统时间)
–systohc set the hardware clock to the current system time(将当前系统时间设置为硬件时间)
–adjust adjust the rtc to account for systematic drift since
the clock was last set or adjusted(增加系统时间观测点)
–getepoch print out the kernel’s hardware clock epoch value(显示硬件的世纪)
–setepoch set the kernel’s hardware clock epoch value to the
value given with –epoch(设置硬件时间的世纪)
–version print out the version of hwclock to stdout(显示hwclock的版本)
Options:
–utc the hardware clock is kept in coordinated universal time(硬件时间为世界时间)
–localtime the hardware clock is kept in local time(硬件时间为当地时间)
–directisa access the ISA bus directly instead of /dev/rtc(直接使用ISA总线上的时间钟)
–badyear ignore rtc’s year because the bios is broken(忽略rtc的世纪年)
–date specifies the time to which to set the hardware clock(设置硬件时用来指定时间值)
–epoch=year specifies the year which is the beginning of the
hardware clock’s epoch value(设置世纪时用来指定年份)
–noadjfile do not access /etc/adjtime. Requires the use of
either –utc or –localtime(不使用观测点)

你可能感兴趣的:(hardware,System,硬件,result,Clock)