Article
Solving the system time problem in Ubuntu and Windows

Solving the system time problem in Ubuntu and Windows

3 October 2017

Reason

The default time in Windows is stored as local time, while in Linux it is stored as UTC.

Solution

Let's change the format of time storage in Linux. Using Ubuntu as an example, let's check the time settings:

sudo timedatectl


Result of command execution:

      Local time: Ср 2017-02-22 14:02:10 EET
  Universal time: Ср 2017-02-22 12:02:10 UTC
        RTC time: Ср 2017-02-22 12:02:10
       Time zone: Europe/Kaliningrad (EET, +0200)
 Network time on: yes
NTP synchronized: no
 RTC in local TZ: no


Change the time storage settings:

sudo timedatectl set-local-rtc 1 --adjust-system-clock


Check the result:

      Local time: Ср 2017-02-22 14:02:10 EET
  Universal time: Ср 2017-02-22 12:02:10 UTC
        RTC time: Ср 2017-02-22 12:02:10
       Time zone: Europe/Kaliningrad (EET, +0200)
 Network time on: yes
NTP synchronized: no
 RTC in local TZ: yes