RHEL7 Study notes on time

Source: Internet
Author: User
Tags time zones

When you find that time is a thief, it has already stolen the light of your choice.

One, GMT, UTC, CST

GMT: (Greenwich Mean time) GMT, the Sun passes Greenwich that moment as the standard for timekeeping.

UTC: (coordinated Universal time) international coordination times, provided by the physical clock.

CST: Standard Time in the United States, Australia or China. Chinese Standard Time: ut+8:00

Second, Linux has hardware clock and software clock two kinds

Hardware clocks (real-time clocks real-time clock) are provided by the crystal oscillator on the motherboard.

The system clock refers to the clock in the kernel.

Linux reads the hardware clock and synchronizes it to the system clock when it is powered on.

Three, related orders

View system time

[[Email protected] ~]# timedatectl Local Time: Thu .- Geneva- -  +: -: $CST Universal Time: Thu .- Geneva- -  -: -: $UTC RTC Time: Thu .- Geneva- -  -: -: $Timezone:asia/shanghai (CST, +0800) NTP enabled:yesntp synchronized:yes RTCinchlocal Tz:no DST active:n/A

Setting the system time

[Email protected] ~]# timedatectl set-time"1989-01-15 05:55"  //date-s " 19890115 05:55:00 "
[Email protected] ~]# timedatectl set-time 1989-01-15    //date-s 19890115
[Email protected] ~]# timedatectl set-time 05:55 "  //date-s 05:55

View all time zones

[Email protected] ~]# timedatectl list-timezonesafrica/abidjanafrica/accraafrica/  Addis_ababaafrica/algiers
...

Change the system time zone

[Email protected] ~]# timedatectl set-timezone africa/date:27 :1989~]# timedatectl set-timezone asia/date   from: £1989

Or

[Email protected] ~]#DateThu Feb -  -: About: +Cst .[[Email protected]~]#RM-f/etc/localtime [[email protected]~]#DateThu Feb -  -: About: +Utc .[[Email protected]~]#LN-s/usr/share/zoneinfo/asia/shanghai/etc/Localtime[[email protected]~]#DateThu Feb -  +: $: ACst .

Change the system time to hardware time

[Email protected] ~]#Date-S20130123Wed Jan at xx:xx:xxCst -[[Email protected]~]# Clock Thu -Feb .  ,: -: -PM CST-0.971377Seconds[[email protected]~]# Clock-W[[Email protected]~]# clockwed atJan -  A:xx: -AM CST-0.437733Seconds

Change hardware time to system time

[[Email protected] ~]# clockwed atJan -  A: to: AAM CST-0.382773Seconds[[email protected]~]#Date-S20080808Fri8 xx:xx:xxCst -[[Email protected]~]# Clock-s [[email protected]~]#DateWed Jan at xx: .: -Cst -

RHEL7 Study notes on 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.