zoukankan      html  css  js  c++  java
  • 【LINUX】操作系统时钟与硬件时钟设置

    当Linux启动时,系统时钟会去读取硬件时钟的设定,之后系统时钟即独立运作。

    man hwclock 写道

    The System Time is the time that matters. The Hardware Clock’s basic purpose in a Linux system is to keep time
    when Linux is not running. You initialize the System Time to the time from the Hardware Clock when Linux
    starts up, and then never use the Hardware Clock again. Note that in DOS, for which ISA was designed, the
    Hardware Clock is the only real time clock.


    man hwclock 还写道

    It is important that the System Time not have any discontinuities such as would happen if you used the date(1L)
    program to set it while the system is running. You can, however, do whatever you want to the Hardware Clock
    while the system is running, and the next time Linux starts up, it will do so with the adjusted time from the
    Hardware Clock.



    如果使用date命令修改了系统时间,并不会自动去修改硬件时钟,因此,当系统下次重启时,系统时钟还会从硬件时钟去取,date设置的时间就无效了。这大概就是为什么需要hwclock命令的原因吧。
    常用参数

      -r, --show         读取并打印硬件时钟(read hardware clock and print result )
      -s, --hctosys      将硬件时钟同步到系统时钟(set the system time from the hardware clock )
      -w, --systohc     将系统时钟同步到硬件时钟(set the hardware clock to the current system time )

    -- < END > --

  • 相关阅读:
    MSSQL 链接Oracle 表
    ORACLE FORM ZA 常用子程序
    FORM 中提交报表并查看结果
    Form界面设置只读
    FRM30403
    oracle 分区表的建立方法
    在Oracle Form中,如何实现自动编号(行号)的功能
    Form中格式化数字、金额
    MSC_SYSTEM_ITEMS,mtl_system_items_b区别
    C#中判断一个字符串是不是包含非法字符
  • 原文地址:https://www.cnblogs.com/fengaix6/p/11773513.html
Copyright © 2011-2022 走看看