Change Localtime and Update Linux

Solutions: Change and Update Time Zone (Bangkok ICT) on CentOS/Debian or other Linux
rm -f /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Bangkok /etc/localtime
#or
#export TZ=Asia/Bangkok

vim /usr/local/lib/php.ini
date.timezone = "Asia/Bangkok"
#or
sed -i '/date.timezone/ s/UTC/\"Asia\/Bangkok\"/' /etc/php/7.0/fpm/php.ini
#or
<?php date('d/m/Y H:i:s', time()+25200); ?>


Update Timezone (CentOS)
yum -y install ntp Update Timezone (Debian)
aptitude -y install ntpdate
ntpdate pool.ntp.org
#or
aptitude install ntp
replace some ntp server below
vim /etc/ntp.conf
server 1.th.pool.ntp.org
server 0.asia.pool.ntp.org
server 2.asia.pool.ntp.org
Recheck your localtime
date
ntpdate pool.ntp.org

Blog | , , , ,
Line it!