Setting a default timezone:
<?php
date_default_timezone_set("Europe/Oslo");
$ts = new DateTime("1978-12-22 09:15");
echo $ts->format("e");
?>
Getting a default timezone:
<?php
$default_identifier = date_default_timezone_get();
echo $default_identifier;
?>
Default timezone is 'guessed' in the following order:
- date_default_timezone_set() value
- php.ini's date.timezone setting