Ubuntu and Windows to solve the dual system of time-sync issues

After switching system, often find the time difference for 8 hours. This is precisely the difference between GMT and UTC's because the two systems considered to be a time for hardware LocalTime another is considered to be UTC, so the solution is simple.

1.Windows amend Act

1.1 Setting UTC

  1. Click the Windows Start menu system and search for regedit.
  2. Navigation menu on the left, navigate to HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ TimeZoneInformation.
  3. In the right window, right-click the blank space, and select New >> DWORD (32 bit) Value.
  4. After that, you will generate a new entry, and the entry is highlighted by default. Rename this entry and set the value of 1 RealTimeIsUniversal.

1.2 recovery LocalTime

Cancel such settings.

2.Ubuntu amend Act

If the file / etc / adjtime absence, systemd assume the hardware clock is set to UTC.

2.1 Setting LocalTime

sudo timedatectl set-local-rtc 1
Remarks:

  1. This automatically generated / etc / adjtime, and updates the RTC; no further configuration.
  2. For while updating time, usetimedatectl set-local-rtc 1 --adjust-system-clock

2.2 recovery UTC

sudo timedatectl set-local-rtc 0

Guess you like

Origin www.cnblogs.com/letisl/p/11855987.html