1,安装linux的时候在设置时间的时候有一个选项:
system clock uses UTC,那么这个UTC是什么意思呢?
2,在linux中,用date查看时间的时候显示:
2008年 12月 17日 星期三 09:04:14 CST
这个CST是什么意思呢?
CST China Standard Time UTC+8:00 中国沿海时间(北京时间)
############################################
以下内容是关于帮助你在linux下设置日期和时间的一些步骤,也包含了一点ntpd时间同步的内容。特别提醒的是在发行版本的限制是red hat系列,包括fedora,centos,redflag,unbreakable linux等。
There are two clocks to configure in Linux, the hardware clock and the system clock. The hardware clock determines the system clock on system boot. While the system is running, changes to one of these doesn't affect the other.
在linux下有两个时钟需要配置,硬件时钟和系统时钟。硬件时钟在系统启动时决定系统时钟,当系统处于运行状态下时,修改其中任何一个并不能对另一个默认生效。
Note: it's best to set the hardware clock and have the system clock be set upon a reboot. Changing the system clock by using the date program on a running system could cause date discontinuities and consequently problems. If you will be using ntpd, you probably don't need to set either of these clocks (unless the current time is more than 1000s off the real time). Just setup ntpd and let ntpd adjust the time (it will do it in small steps to keep system timestamps reliable).
# ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
# date MMDDhhmmCCYY.sswhere MM is month, DD is day, hh is hour, mm is minutes, CCYY is year and ss is seconds. Time should be in 24-hour notation.
# date -s hh:mm:ss
# setclockthis method looks at /etc/sysconfig/clock to determine whether the hardware clock is set to UTC
# hwclock --systohcuse the second option if you use UTC.
# hwclock --systohc --utc
# hwclock --set --date="9/22/96 16:45:05"Everytime you use the hwclock --set command, it will create or edit the file /etc/adjtime to determine the systematic drift. Once you have some history, you can use the --adjust option to adjust the hardware clock appropriately. Run as a cron job if you want the clock to adjust automatically on a regular schedule. Don't use the --adjust function when using ntpd since ntpd will turn the "11 minute mode" on, which is best left alone. See the hwclock manpage for more info.
server time.nist.govEnable multicastclient:
fudge time.nist.gov stratum 10
multicastclient # listen on default 224.0.1.1Edit /etc/sysconfig/ntpd if necessary. The default should be fine.
# service ntpd start
欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) | Powered by Discuz! X3.2 |