DateTime::setTimezone

PHP 5 >= 5.2.0, PHP 7, PHP 8
DateTime::setTimezone - Sets the time zone for the DateTime object
Manual
Code Examples

Example #1 DateTime::setTimeZone example

Result: 2000-01-01 00:00:00+12:00 2000-01-01 01:45:00+13:45
PHP Version:


Function DateTime::setTimezone:

Date and Time Functions

Most used PHP functions