doushi7761
2014-12-16 07:00 阅读 80
已采纳

php在澳大利亚/悉尼错误的时区问题

I want to get Timezone name in Australia/Sydney (not a time)

http://php.net/manual/en/timezones.australia.php (timezone set)

$t = new DateTime('now'); 
$t->setTimeZone( new DateTimeZone('Australia/Sydney'));
echo $t->format("Y D M j H:i T");

And result = 2014 Tue Dec 16 17:54 EST

http://www.timeanddate.com/time/zones/aedt

In this URL, Australia/Sydney is AEDT. Why php return EST?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

2条回答 默认 最新

相关推荐