- PHP设置北京时间
- #vi /etc/php.ini
- 在[PHP]下加一行
- date.timezone=PRC
- Linux下设置时间
- CentOS6.5
- 1、编辑配置文件
- #vi /etc/sysconfig/clock
- 确定如下内容:
- ZONE="Asia/Shanghai"
- UTC=false
- ARC=false
- 2、时区设置为上海
- #ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
- 3、对准时间
- #yum install ntp
- #ntpdate asia.pool.ntp.org
- 4、硬件时间与系统时间一致
- #/sbin/hwclock --systohc
- Centos7
- 查看时区
- #timedatectl
- 设置时区
- #timedatectl set-timezone Asia/Shanghai
linux 设置北京时间
最新推荐文章于 2024-05-16 06:34:30 发布