Copyright © tutorialspoint.com
|
array timezone_transitions_get ( DateTimeZone $object ) array DateTimeZone::getTransitions ( void ) |
These functions return all transitions for the timezone.
The above two functions are equivalent and any of the functions can be used as shown below in the example.
| Parameter | Description |
|---|---|
| object | DateTimeZone object. |
Returns numerically indexed array containing associative array with all transitions on success or FALSE on failure.
Following is the usage of this function:
<?php
$timezone = new DateTimeZone("CET");
print_r(reset($timezone->getTransitions()));
echo"------------------------------------------------\n";
print_r( reset( timezone_transitions_get ($timezone) ) );
?>
|
This will produce following result:
Array
(
[ts] => -1693706400
[time] => 1916-04-30T22:00:00+0000
[offset] => 7200
[isdst] => 1
[abbr] => CEST
)
------------------------------------------------
Array
(
[ts] => -1693706400
[time] => 1916-04-30T22:00:00+0000
[offset] => 7200
[isdst] => 1
[abbr] => CEST
)
|
Copyright © tutorialspoint.com