How to set the Time/Date and Timezone

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s