UTC引發時區配置和Linux系統時間和bios時間問題

來源:互聯網
上載者:User

標籤:0.00   oca   安裝   number   ubuntu   was   ati   override   作業系統   

在安裝Linux作業系統時,有一個選項是UTC,預設是勾上的。系統安裝好後會把BIOS時間當成UTC標準時間,然後再根據時區調整系統時間。所以會發生明明時區設定正確,時間卻不正確的情況。所以安裝時,最好是取消那個勾。

 

如果已經裝好,可以通過修改設定檔的方式修改。

redhat系統 修改/etc/adjtime第三行為LOCAL

[[email protected] ~]# 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.

 

 

ubuntu系統

hwclock的時區在/etc/default/rcS檔案中設定,裡面有一個參數UTC,預設值為True,表示使用UTC時 區,如果設定為no,那表示使用osclock的時區

 

UTC引發時區配置和Linux系統時間和bios時間問題

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.