<?php
$dto = new DateTime;
echo $dto -> format('e') . PHP_EOL;
echo $dto -> format('T') . PHP_EOL;
echo $dto -> format('P') . PHP_EOL;
if ( $dto -> format('I') ) {
echo "Sommerzeit" . PHP_EOL;
} else {
echo "Mist! Winter." . PHP_EOL;
}
Ausgabe:
Europe/Berlin
CET
+01:00
Mist! Winter.
Link: