phptimezone

php wrong timezone issue in Australia/Sydney


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?


Solution

  • http://mm.icann.org/pipermail/tz-announce/2014-August/000023.html

    Australia DST timezone abbreviation incorrect when using date_default_timezone_set

    It was version issue.