DateTimeZone::getTransitions

PHP 5 >= 5.2.0, PHP 7, PHP 8
DateTimeZone::getTransitions - Returns all transitions for the timezone
Manual
Code Examples

DateTimeZone::getTransitions(
     [int$timestampBegin = PHP_INT_MIN],
     [int$timestampEnd = PHP_INT_MAX]
): public array|false

Procedural style

arrayfalsetimezone_transitions_get DateTimeZoneobject inttimestampBeginPHP_INT_MIN inttimestampEndPHP_INT_MAX

Parameters

object

Procedural style only: A DateTimeZone object returned by timezone_open

timestampBegin

Begin timestamp.

timestampEnd

End timestamp.

Return Values

Returns a numerically indexed array of transition arrays on success, or false on failure.

Transition Array Structure
Key Type Description
ts int Unix timestamp
time string DateTimeInterface::ISO8601 time string
offset int Offset to UTC in seconds
isdst bool Whether daylight saving time is active
abbr string Timezone abbreviation

Example of DateTimeZone::getTransitions

Show all examples for DateTimeZone::getTransitions

PHP Version:


Function DateTimeZone::getTransitions:

Date and Time Functions

Most used PHP functions