Time and time zone Problems In debian

Source: Internet
Author: User
Time and time zone issues In debian-Linux Release Technology-Debian information. See the following for details. In the Linuix system, the system time is determined by three factors: hardware time, UTC (/etc/default/rcS), and Timezone. The UTC option in/etc/default/rcS tells the Linux system whether the hardware time is UTC time. Timezone is used to set the system's UTC time zone (I am using Asia/Shanghai ). Finally, when the system starts, it reads the hardware time and calculates the system localtime based on whether it is UTC time and the Timezone in which the system is located.

The following is the time of the hardware clock.
DNAS :~ # Hwclock? Show
Wed 03 Oct 2007 09:40:10 pm cst-0.169539 seconds

Since I have Set UTC = no in/etc/default/rcS, I told the system that the hardware time is not UTC time. Then the system time will be determined based on the following two files:

/Etc/timezone
/Etc/localtime

Install ntpdate to synchronize time

Apt-get install ntpdate

Use tzconfig to set the time zone. Make sure it is Asia/shanghai.

In addition, debian/linux considers the BIOS time as World Time (UTC) by default ).

Modify/etc/default/rcS and change the UTC = yes option to UTC = no.

This is OK.

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.