date MMDDhhmm[CC]YY[.ss]
The parts of the command argument have the following meanings:
MM
A two-digit month, 01-12.
DD
A two-digit day of month, 01-31.
hh
A two-digit hour, 00-24.
mm
A two-digit minute, 00-59.
CC
An optional two-digit century; for example, 19 or 20.
YY
A two-digit year; for example, 99 or 00.
ss
An optional two-digit second, 00-59.
The command displays the time you enter and then sets the system time:
debian:~# date 073010411999
Fri Jul 30 10:41:00 PDT 1999
修改成shanghai:
debao:/etc# ls -l /etc/localtime
lrwxrwxrwx 1 root root 33 2006-04-29 21:37 localtime -> /usr/share/zoneinfo/Asia/Shanghai
而且/etc/default/rcS ?的 UTC ??为UTC=no,这个好象和bios的设置也不一样,必须改成UTC=yes。
然后设置正确的时间:date MMDDHHYYYY(.SS)
写回bios:hwclock --systohc