How to set the time in CentOS?
How to change the time in CentOS?
How to modify the date and time in CentOS?
1. Remove current time
$ rm /etc/localtime
2. Set new time zone. As I’m located in Seoul, I set “Asia/Seoul”. You can pick any time zone among the list from zoneinfo. Check the list by “ls -al /usr/share/zoneinfo/”.
$ ln -s /usr/share/zoneinfo/Asia/Seoul /etc/localtime
3. Set the current time. The format is MMDDHHMMYYYY.
The “date 072815002017” means setting current time as 15:00, July 28th, 2017/
$ date <MMDDHHMMYYYY>
4. Sync the hwclock with the current time and date
$ hwclock –systohc