Ubuntu 16.04 &windows 7 Dual system system time inconsistent, 8 hours difference

Source: Internet
Author: User
Tags local time


Windows/ubuntu Dual system users will find that the time in Ubuntu is normal when Windows's system time is changed to 8 hours ago.

The original Linux operating system is based on the CMOS time as Greenwich Mean time, and then according to the time zone set by the system to determine the current system time. However, Windows modifies the CMOS time directly. And China's time zone is +8, so it will cause time to be adjusted-8 hours.

So you can get Windows to use the time zone or have Ubuntu use local time.

The way to modify Windows to use the time zone is toRegistration Form:

hkey_local_machine\system\currentcontrolset\control\timezoneinformation\

The following adds a REG_DWORD key named Realtimeisuniversal and assigns a value of 1.

The way to get Ubuntu to use local time is to:

sudo gedit/etc/default/rcs

Change the utc=yes inside to Utc=no.


Before looking at this version, found no use, Ubuntu 16.04 in the RCS has no utc=yes this sentence,

The change method is: sudo timedatectl SET-LOCAL-RTC 1


[Email protected]:~$Timedatectl
Local time: Day 2016-06-26 00:10:02 CST
Universal time: Six 2016-06-25 16:10:02 UTC
RTC time: 62,016-06-25 16:10:02
Time Zone:asia/shanghai (CST, +0800)
Network Time On:yes
NTP Synchronized:yes
RTC in local Tz:no
[Email protected]:~$sudo timedatectl SET-LOCAL-RTC 1
[sudo] xueyue8 password:
[Email protected]:~$Timedatectl
Local time: Day 2016-06-26 00:10:46 CST
Universal time: Six 2016-06-25 16:10:46 UTC
RTC time: Day 2016-06-26 00:10:46
Time Zone:asia/shanghai (CST, +0800)
Network Time On:yes
NTP Synchronized:yes
RTC in local Tz:yes

Warning:the system is configured to read the RTC time in the local time zone.
This mode can is not fully supported. It'll 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 any possible, use the RTC in UTC by calling
' Timedatectl SET-LOCAL-RTC 0 '.
[Email protected]:~$

From

Http://blog.chinaunix.net/uid-8305736-id-2033022.html

http://www.v2ex.com/t/274007


This article is from the "Snow Moon Studio" blog, please be sure to keep this source http://xueyue8.blog.51cto.com/4650249/1792933

Ubuntu 16.04 &windows 7 Dual system system time inconsistent, 8 hours difference

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.