Current system time
root@ubuntu :/# date -r
Results the time zone is – 0500, and the Chinese time zone should be + 8
0It’s East eight. We need to change the time zone
1. Run tzselect
root@ubuntu :/# tzselect
Here we choose Asia, China after confirmation, and finally Beijing
2. Copy the file to the / etc directory
root@ubuntu :/# cp /usr/share/zoneinfo/asia/shanghai /etc/localtime
3. Check the time again, date – R, which has been modified to Beijing time
Change time
Revision time
Sudo date – s mm / DD / YY / / modified
dateSudo date – s HH: mm: SS / / modification time
After the modification time, modify the hardware CMOS time
Sudo hwlock &; systohc / / is very important. Without this step, the next time is still not allowed