zoukankan      html  css  js  c++  java
  • Fix time differences between Ubuntu and Windows

    A. To fix the UTC / local time difference between Ubuntu and Windows from Ubuntu by making Ubuntu use local time.


    Before proceeding, note that according to the Ubuntu wiki, "the advantage of having the hardware clock as UTC is that you don't need to change the hardware clock when moving between timezones or when Daylight Savings Time (DST) begins or ends as UTC does not have DST or timezone offsets". So this is not recommended and if you can, you should use method B., and fix this from Windows.

    For Ubuntu 16.04 and newer, run the following command (thanks to Erwinson Pagtalunan for the update!):
    timedatectl set-local-rtc 1

    You can then check if Ubuntu uses local time, you can then use the following command:
    timedatectl
    Which should display the following "RTC in local TZ: yes". A warning will also be displayed. Here's the full command output:
    $ timedatectl
          Local time: Lu 2016-04-25 12:18:22 EEST
      Universal time: Lu 2016-04-25 09:18:22 UTC
            RTC time: Lu 2016-04-25 12:18:22
           Time zone: Europe/Bucharest (EEST, +0300)
     Network time on: yes
    NTP synchronized: no
     RTC in local TZ: yes
    
    Warning: The system is configured to read the RTC time in the local time zone.
             This mode can not be fully supported. It will create various problems
             with time zone changes and daylight saving time adjustments. The RTC
             time is never updated, it relies on external facilities to maintain it.
             If at all possible, use RTC in UTC by calling
             'timedatectl set-local-rtc 0'.
  • 相关阅读:
    Robomaster电控入门(3)RM系列电机控制
    Robomaster电控入门(2)DR16&DT7接收与解码
    惊魂未定之Ubuntu重装显卡驱动
    ORB-SLAM demo测试
    Intel NUC5安装Kinect驱动踩坑
    Ubuntu下ROS&&Kinect&&ORB-SLAM环境搭建
    Robomaster电控入门(1)STM32开发环境搭建
    Robomaster电控入门(0)绪论
    WhaleCTF之隐写-Find
    WhaleCTF之web-本地登录
  • 原文地址:https://www.cnblogs.com/albertofwb/p/6122238.html
Copyright © 2011-2022 走看看