I noticed something odd while using PHP's timezone_transitions_get()
. The first element of the returned array seems to be this improbable/unuseable value, regardless of the timezone used:
php -r 'print_r(timezone_transitions_get(new DateTimeZone("GMT")));'
Array
(
[0] => Array
(
[ts] => -9223372036854775808
[time] => -292277022657-01-27T08:29:52+0000
[offset] => 0
[isdst] =>
[abbr] => UTC
)
)
php -r 'print_r(timezone_transitions_get(new DateTimeZone("US/Pacific")));'
Array
(
[0] => Array
(
[ts] => -9223372036854775808
[time] => -292277022657-01-27T08:29:52+0000
[offset] => -25200
[isdst] => 1
[abbr] => PDT
)
...
I've tried this with PHP 5.3 and 5.4. It seems to be independent of the version of PECL timezonedb used as well. Anyone know why this is happening?