linux bios密码设置时间,UTC引发时区配置和Linux系统时间和bios时间问题

在安装Linux操作系统时,有一个选项是UTC,默认是勾上的。系统安装好后会把BIOS时间当成UTC标准时间,然后再根据时区调整系统时间。所以会发生明明时区设置正确,时间却不正确的情况。所以安装时,最好是取消那个勾。

cf649996a439ce97bf5fb8c2b929b724.png

如果已经装好,可以通过修改配置文件的方式修改。

redhat系统 修改/etc/adjtime第三行为LOCAL

[root@db-01 ~]# vim /etc/adjtime

-0.098726 1524046105 0.000000

1524046105

LOCAL

~

The format of the adjtime file is, in ASCII:

Line 1: 3 numbers, separated by blanks: 1) systematic drift rate in seconds per  day,  floating

point decimal; 2) Resulting number of seconds since 1969 UTC of most recent adjustment or cali-

bration, decimal integer; 3) zero (for compatibility with clock(8)) as a decimal integer.

Line 2: 1 number: Resulting number of seconds since 1969 UTC of most recent calibration.   Zero

if  there has been no calibration yet or it is known that any previous calibration is moot (for

example, because the Hardware Clock has been found, since that calibration, not  to  contain  a

valid time).  This is a decimal integer.

Line  3:  "UTC"  or  "LOCAL".  Tells whether the Hardware Clock is set to Coordinated Universal

Time or local time.  You can always override this value with options  on  the  hwclock  command

line.

You can use an adjtime file that was previously used with the clock(8) program with hwclock.

修改时区的方法

修改配置文件/etc/sysconfig/clock

更新时区tzdata-update

ubuntu系统

hwclock的时区在/etc/default/rcS文件中设置,里面有一个参数UTC,默认值为True,表示使用UTC时 区,如果设置为no,那表示使用osclock的时区

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值