Time zone and time settings in Debian

Source: Internet
Author: User

Paste: http://www.rcz.cn/Default.aspx? Tabid = 262 & entryid = 52

Linux uses two types of time: World Time (GMT) and local time ). World time is GMT. Users in each time zone obtain the local time based on the difference between the time zone and the international time. For example, China is in the East 8 zone (CST +), so the local time is 8 hours faster than the international time.

The command for setting the time zone in Debian is tzconfig.

Linux loads the BIOS time every time it starts, and writes the time back to the BIOS when it exits. By default, Linux considers the time in BIOS as World Time (UTC ). Therefore, it reads the world time and calculates the local time according to the user's time zone. For China, 8 hours is added. This mechanism may cause problems in a multi-system environment: Because Windows only knows the local time, the time you set in Windows (will be written back to BIOS) is considered as world time in Linux, as a result, the Linux local time is faster than the correct time by 8 hours (for China ). If you change the local time minus 8 hours in Linux (the world time will also be reduced by 8 ), it will lead to an eight-hour delay in Windows (because Linux will write the modified world time back to BIOS when it exits) (I used VMware and checked the BIOS, indeed, haha ).

In Debian, the solution is to edit the file/etc/default/RCs and change the UTC = YES option to UTC = No (that is, let Linux think that the BIOS is local time ). Then set the correct local time in the BIOS.

Modification time

In RedHat:
Date-s mmddhhmmyyyy

In Debian:
Date-s "yyyy/mm/dd hh: mm: SS"
Or
Date-s 'yyyy/MM/dd hh: mm: ss'
Or
Date-s mm/DD/YYYY
Date-s hh: mm: SS

Related Article

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.