Linux Time and TimeZone settings

Source: Internet
Author: User

One, time zone setting

Because UTC is used to install the system, what is UTC is that UTC is the time of the 0 time zone, which is the international standard, while China is in the utc+8 time zone.

Using the Tzselect command, the process is as follows:

  

  

  

You can see that this environment variable is set, write the declaration of this variable to/etc/profile, and re-import it.

Second, time setting

There are two Linux system clocks, one is the hardware clock , that is, the BIOS time, which is the time we see in CMOS setup, and the other is the system clock , which is the kernel time of the Linux system.

When Linux starts, the system kernel reads the hardware clock settings, and the system clock is independent of the hardware. Sometimes we find that the system clock is inconsistent with the hardware clock, so we need to perform time synchronization and share the command usage of time settings and clock synchronization.

  System Time setting: 

The date command sets the dates to June 18, 2014

# date-s 06/18/14

Set the time to 14 points, 20 minutes, 50 seconds

# date-s 14:20:50

Set the time to June 18, 2014 14:16 30 seconds (MMDDHHMMYYYY.SS)

# date 0618141614.30

  Hardware Time Setting :

Viewing the system hardware clock

# Hwclock--show or

# clock--show

Set Hardware time

# Hwclock--set--date= "06/18/14 14:55" (Month/day/year: minutes: seconds) or # clock--set--date= "06/18/14 14:55" (Month/day/year: minutes: seconds)

  the command that synchronizes system time and hardware time with each other :

# hwclock--hctosys Synchronize hardware time to System time (System time is synchronized)

# Hwclock--SYSTOHC synchronizes system time to hardware time (hardware time is synchronized)

  

Linux Time and TimeZone settings

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.