PHP Function Timezone Transitions Get
Article about php function timezone_transitions_get:
In this article we are going to see an example of how we can use a built-in php function to retrieve information about transitions for a specific date and timezone. This is very useful for determining if someone’s user role on one blog is the same as another blog, or for other purposes.
The php function timezone_transitions_get is an alias for the DateTimeZone::getTransitions() method and functions in the same way. It accepts a DateTimeZone object as its first parameter and returns an array containing all transitions on success or False on failure.
$timestamp_begin: A Unix timestamp representing the start time for which you want to retrieve transition information. This is optional, if left blank it will default to the beginning of available time.
[ts]: The transition time in UTC microseconds since midnight Jan 1 1970. [time]: The transition time as a string in the format "Y-m-d H:i:s". [offset]: The transition offset from UTC at the start of available time. [isdst]: A boolean value (1 or 0) indicating whether the offset is Daylight Saving Time.
This code sample will retrieve information about all transitions from a particular time zone for the America/New_York timezone. This will return information such as the transition start and end dates, the type of transition, the timezone abbreviation, the dstoff, and whether or not it is seamless.