Get the App
SLTechnology News&Howtos  ›  Servers  › 

Solve Linux time A.M. And P.M. An upside-down problem

Shulou Source: shulou.com Published: 2022-06-02 18:25:41 10月03日 Update

Recently, when I set up the openstack test environment, I found that the Linux system was at the wrong time. For example, at 10:10 in Linux, the output of date was Mon Apr 8 22:10:00 EDT 2019.

I tried a lot of methods, but later I noticed EDT. I remember that the date output of Linux was CST. When I checked it on the Internet, it was really a time zone problem.

EDT: refers to Eastern Daylight time, Boston, New York City, Washington, D.C., all in this time zone, with a time difference of 12 hours from Beijing time, 12 hours later.

The solution is as follows:

Mv / etc/localtime / etc/localtime.bakln-s / usr/share/zoneinfo/Asia/Shanghai / etc/localtime

Then execute date to verify the OK!

Tags: Time method hour time zone output problem no no east daylight saving time daylight saving time time jet lag for example environment system Bols Beijing Washington D.C. Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Microsoft Shulou Technology Docker vpn