从PHP时区转换_get()返回的这个奇怪的值是什么?

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?

Have a look at this documentation for reference of timezone_transitions_get. Apparently, they are missing the following details:

The [ts] value represents the timestamp of the transition, as the number of microseconds since Midnight Jan 1 1970 UTC. It is stored as a 64-bit signed integer, which -9223372036854775808 is the smallest possible value.

The [time] value is the ISO8601 string equivalent of the [ts] value. It looks funny for negative years, especially ones with that many digits, but that is indeed the mathematical equivalent.

Think of these as the "beginning of time". Well, at least as far as computers are concerned. :-)

The [offset] value is the number of whole seconds represented by the UTC offset of the transition. Divide by 3600 and you will get an equivalent number of hours.

The [isdst] value is a boolean (1 or blank) indicating if the offset represents Daylight Saving Time.

The [abbr] value is a short abbreviation describing the time zone. Abbreviations can be ambiguous, so it's just there as a display value and for easy reference. Nothing should be keyed off of it.