程序中添加时间的初始化语句:“date_default_timezone_set("asia/shanghai");
定义和用法
the date_default_timezone_set() function sets the default timezone used by all date/time functions.
date_default_timezone_set()函数的作用是:设定用于一个脚本中所有日期时间函数的默认时区。
date_default_timezone_set(timezone) |
| parameter 参数 |
description 描述 |
|---|---|
| timezone | required. the timezone identifier, like "utc" or "europe/paris". list of valid timezones: http://ww*w**.php教程.net/manual/en/timezones.php 必要参数,时区确认器,如“utc”或“europe/paris”。下面列出了有效的时区:http://ww*w**.php.net/manual/en/timezones.php |
note: this function always returns true (even if the timezone parameter isn't valid).
注意:这个函数总是返回true(即使时区参数无效的情况下)。
<?phpecho (date_default_timezone_set("europe/paris"));?>
|
the output of the code above will be:
上述代码将输出下面的结果:
韩剧再婚皇后阿里云盘全集高清1080P资源链接-韩剧再婚皇后免费阿里云盘资源下载4K高清无删减版链接
poipiku网站如何打开-poipiku官网网页版访问入口
明日方舟:终末地-云游戏畅玩入口-明日方舟:终末地-网页版在线直连地址
poki在线小游戏网页版-poki免费游戏大全入口
poki游戏入口-点开即玩-poki游戏-在线免费畅玩
原神akt大佬资源viciNeko入口链接-原神akt大佬资源网页vicineko入口链接分享