红联Linux门户
Linux帮助
当前位置: 红联Linux门户 > Debian

debian修改系统时间

发布时间:2007-11-10 00:20:20来源:红联作者:Alwaysfirm
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
文章评论

共有 0 条评论