这有什么意义?
date_default_timezone_set("America/New_York");
echo date("e"); //output "America/New_York"
echo date("T"); //output "CDT"
在某处我可以设置America / New_York = EDT吗?
答案 0 :(得分:1)
尝试:
<?php
date_default_timezone_set('America/New_York');
$script_tz = date_default_timezone_get();
if (strcmp($script_tz, ini_get('date.timezone'))){
echo 'Script timezone differs from ini-set timezone.';
} else {
echo 'Script timezone and ini-set timezone match.';
}
?>