函数功能:用于所有日期时间函数的默认时区
示例:
//定义一个时区常量,可放置于配置文件
define('TIME_ZONE','Asia/shanghai');
//执行函数
date_default_timezone_set(TIME_ZONE);
date('Y-m-d H:i:s');
输出结果:当前时间
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!