Linux under UTC time modified to GMT time __linux

Source: Internet
Author: User
Tags gmt time zone local time

The system time and local time were not always correct when the machine was debugged, and the beginning thought it was time error,


Then find the use of Ntpdate-u 211.115.194.21 synchronized network time, but still wrong, compared with the local only found that there is always a difference of eight hours,


Find it on the Internet again, it's a time zone problem, the machine uses UTC and needs to be corrected to GMT. Found on the Internet, are copied and pasted, the content is a bit incomplete, after the change is recorded here.


Using date viewing time, you can see that the suffix takes UTC time, such as this: Tue 08:30:10 UTC 2017

Copy GMT time zone data to localtime file

Cp/usr/share/zoneinfo/gmt/etc/localtime

Then set the time zone Ln-sf/usr/share/zoneinfo/asia/shanghai/etc/localtime #linux的时区设置为上海时区


Then again synchronization network time: Ntpdate-u 211.115.194.21

Then set the hardware time:./usr/sbin/hwclock--SYSTOHC

It's normal for me to get to this step on my machine ...

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.