Debian system modification time and time zone

Source: Internet
Author: User

Time zone:

 

1. Run the following command to configure the time zone on the GUI:

Dpkg-reconfigure tzdata
This operation will modify two files

/Etc/timezone # This text file can be directly modified/etc/localtime # This file can be modified through a soft connection ln-SF/usr/share/zoneinfo/Asia/Shanghai/etc/localtime or directly CP/usr/share/zoneinfo/Asia/Shanghai/etc/localtime. Therefore, you need to modify the time zone in two places: 1. modify/etc/timezone: Modify the file. /usr/share/zoneinfo/Asia/copy the corresponding files in the directory to/etc/and name it localtime. Then, you can use the date command to check whether the time zone has changed.

2. Text method:

[Email protected]: ~ # Tzselectplease identify a location so that time zone rules can be set correctly. please select a continent or ocean. 1) Africa 2) Americas 3) Antarctica 4) Arctic Ocean 5) Asia 6) Atlantic Ocean 7) Australia 8) Europe 9) Indian ocean10) Pacific ocean11) none-I want to specify the time zone using the POSIX TZ format.3. directly edit/etc/timezone

2. Linux time

Linux time is divided into system time and hardware time

System Time: Time in the current Linux Kernel

Hardware time: There is a battery clock on the motherboard. This hardware clock can be set in the BIOS clock. When Linux is started, the hardware time will be read as the system time, then the system time runs independently of the hardware.

The system time is related to the time zone;

UTC: Time coordination time

GMT: Greenwich Mean Time,

In the/etc/default/RCS file, set whether the system uses UTC,

UTC = yes/no

The computed motherboard has its own hardware time, So shutdown will not be lost.

BiOS = local time, UTC = No
BiOS = UTC time, UTC = Yes
3. Set the time

# Change the time method below dibian: 1. Change to the specified date-s 'month/day/year' [email protected]: ~ # Date Friday, January 1, September 19, 2014 00:07:40 CST [email protected]: ~ # Date-s '2014/1/14' Saturday, 09/20 00:00:00 CST [email protected]: ~ # Date, Saturday, September 20, 2014 00:00:03 cst2. change to the specified hour, minute, second, date-s hour: minute: Second 3. change to date-s "yyyy/mm/dd hh: mm: SS"

 

This article is from the "Lang taosha" blog and will not be reproduced!

Debian system modification time and time zone

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.