PHP timezone_transitions_get() Function

PHP timezone_version_get() Function
PHP timezone_open() Function

In this article, you will learn how to get the transitions of the timezone. The PHP
timezone_transitions_get() function returns the timezone transitions.

What is the syntax of the timezone_transitions_get() function in PHP?
Procedural syntax?

Procedural syntax:

timezone_transitions_get(object, timestamp_start, timestamp_end)

Object-oriented syntax:

DateTimeZone::getTransitions(timestamp_start, timestamp_end)

Both of the above syntax produce the same results. The first is without using the class and
the second use the DateTimeZone class to call the method.

objectThe DateTime object (for procedural way) – required
timestamp_startStarting timestamp – Optional
timestamp_endEnding timestamp – Optional
PHP timezone_transition_get() method

Example of the timezone_transition_get() function

$zone = new DateTimeZone("Europe/Paris");
// procedural way

// OOP way 
PHP timezone_version_get() Function
PHP timezone_open() Function
en English
Scroll to Top