Update ubuntu system time when offline

 

When installing the ubuntu server, the English version is selected by default. The system defaults to the US Eastern Time, which is 8 hours faster than Beijing time.

 

How to get system time zone and time without internet

 

1. Update the time zone, use tzselect in the command line to select Asia/China/Bei jin according to the prompt, and then confirm; modify the ~/.profile file according to the prompt

Add TZ='Asia/Shanghai' at the end; export TZ

2. After one step, the time zone will become CST, if the time is still wrong, we use date -s xxxx to manually update it once

3. hwclock  --systohc write hardware 

4. Modify the /etc/default/rcS file and change UTC=yes to UTC=no

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326932921&siteId=291194637