The CentOS system time is 8 hours different from the current time. solution:

Source: Internet
Author: User
Tags cst time
After installing the CentOS system, many netizens find that the time is 8 hours different from the current time. This is because the time zone We selected when installing the system is Shanghai, and the default bios time of CentOS is utc, so the time difference is 8 hours. At this time, the bios time is inconsistent with the system time. One represents utc time, and the other represents cst (+ 8 time zone ),

After installing the CentOS system, many netizens find that the time is 8 hours different from the current time. This is because the time zone We selected when installing the system is Shanghai, and the default bios time of CentOS is utc, so the time difference is 8 hours. At this time, the bios time is inconsistent with the system time. One represents utc time, and the other represents cst (+ 8 time zone ),

After installing the CentOS system, many netizens find that the time is 8 hours different from the current time. This is because the time zone We selected when installing the system is Shanghai, and the default bios time of CentOS is utc, so the time difference is 8 hours. At this time, the bios time is inconsistent with the system time. One represents utc time, and the other represents cst (+ 8 time zone), that is, Shanghai time.

The following describes how to solve the synchronization time:
1. vi/etc/sysconfig/clock # edit the file
ZONE = "Asia/Shanghai"
UTC = false # Set to false, and the hardware clock is not consistent with utc time
ARC = false

2. ln-sf/usr/share/zoneinfo/Asia/Shanghai/etc/localtime # Set the linux time zone to Shanghai.
3. ntpdate 192.43.244.18 # time point. You must first install the ntp server yum install ntp
4./sbin/hwclock -- systohc # Set the hardware time to be consistent with the system time and calibrate

At this point, the linux system time and the computer hardware time are both cst time and Shanghai time zone.

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.