Set Ubuntu to local time

Source: Internet
Author: User
Tags local time

When you switch the operating system, you will find a problem, Windows and Ubuntu time will appear inconsistent. After setting the time correctly in Windows, the time to go back to the system in Ubuntu is different, and when you set the time correctly in Ubuntu, you get into Windows, and the time is inconsistent. The reason for this is that Windows and Ubuntu have different ways of looking at hardware time by default (the time that Bois on the motherboard is displayed). Knowing the cause of the problem, we will solve the problem.
This is a question about time, so let's start with the concept of time.
UTC is Universal time coordinated, reconciling the time
GMT is Greenwich Mean time, Greenwich Normal
Windows and Linux default to the way the system hardware time is different:
* Windows treats system hardware time as local time, that is, the time displayed in the operating system is the same as the time shown in the BIOS.
* Linux/unix/mac hardware time as UTC, the operating system display time is the hardware time after conversion, for example, Beijing time is gmt+8, the system display time is hardware time +8.
In this way, there is a problem when multiple systems coexist in the PC. If your Ubuntu and Windows are set in time zone eight in the east of Beijing, you can change the current system time to 9:00am in Ubuntu. The actual c time that is stored in the hardware at this point is 1:00am. When you reboot into Windows, you will find that the time shown in Windows is 1:00am, which is eight hours slower than in Ubuntu. Similarly, after you change in Windows or synchronize the system time with the network, and then go to Ubuntu to see, the system will be 8 hours faster. In areas where daylight saving time is practiced, the situation may be more complicated.

There are two ways to keep the time consistent, you can choose one to use according to their actual situation

Let Windows take hardware time as UTC

Start and run->cmd, open the command-line program (Vista will open the command-line program as an administrator to have access to the registry), enter the following command on the command line and return
Reg Add hklm\system\currentcontrolset\control\timezoneinformation/v realtimeisuniversal/t reg_dword/d 1

=============================================================================================================== ====================================

UTC time is not used in Ubuntu and local time is enabled

Edit

/etc/default/rcs

Change the contents of "Utc=yes" to "Utc=no" and then restart the system after saving.

Set Ubuntu to local time

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.