Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. If our server was running in China, then we would use the "Asia/Shanghai" time zone:
  2.  
  3. rm -rf /etc/localtime
  4. ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
  5. You can navigate to the directory /usr/share/zoneinfo to find the appropriate time zone. There is an excellent resource on Wikipedia for timezone listings.
  6.  
  7. Input date again, you will find that the local system time has changed to CST (China Standard Time) GMT+0800.
  8.  
  9. Next, we will write the system time info into the hardware clock.
  10.  
  11. vi /etc/sysconfig/clock
  12. Modify the content of this file as below.
  13.  
  14. ZONE="Asia/Shanghai"
  15. UTC=false
  16. ARC=false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement