Knowledgebase
Portal Home > Knowledgebase > 5. Dedicated Servers > Specially Linux Tips > Change Timezone and set time & date for CentOS
Change Timezone and set time & date for CentOS
| Change Timezone
cd /usr/share/zoneinfo/Asia/
cp /etc/localtime /etc/localtime-ori
cp Kuala_Lumpur /etc/localtime
Set time and date
date MMDDhhmmYYYY
Example: date 043017212008
(that is the time of my posting)
MM - Two digit month number DD - Two digit date hh - Two digit 24 hour system hour mm - Two digit minute YYYY - Four digit year code
If conmmand above doesn't work, do the following
cd /usr/share/zoneinfo/Asia
ln -sf Kuala_Lumpur /etc/localtime
Sync your time
ntpdate pool.ntp.org
Confirm your date
date
If ntp is not install, you may run this to install ntp
yum install ntp
|
Add to Favourites
Print this Article
|
Also Read
Powered by WHMCompleteSolution