centos 服务器时间处理
1. date 查看时间,
hwclock查看硬件时间
2. tzselect 选择时区
3. 设置时间显示
TZ='Asia/Shanghai'; export TZ
~/.bash_profile
source ~/.bash_profile
4. 时间同步
yum -y install ntp ntpdate
ntpdate cn.pool.ntp.org
以上设置也可以通过宝塔直接设置服务器时区,简洁操作
5. thinkphp app.php设置时区
// 默认时区
'default_timezone' => 'Asia/Bangkok',

浙公网安备 33010602011771号