php:PHP时区设立
php:PHP 时区设置
question:
PHP 时区设置date_default_timezone_set(Etc/GMT-8)为什么代表东八区
answer:
date_default_timezone_set("Etc/GMT"); 是格林威治标准时间,得到的时间和默认时区是一样的
ate_default_timezone_set("Etc/GMT+8"); 比林威治标准时间慢8小时,
date_default_timezone_set("Etc/GMT-8"); 东八区,我们比那快8小时所以减8
或者使用:date_default_timezone_set('PRC'); 设置中国时区
/phprm/15781.htmlwww.phpzy.comtrue/phprm/15781.htmlTechArticlephp:PHP时区设立 php:PHP 时区设置 question: PHP 时区设置date_default_timezone_set(Etc/GMT-8)为什么代表东八区 answer: date_default_timezone_set("Etc/GMT"); 是林威治标准时间,得到的时间和默认时区是一...
PHP之友评论