- date_default_timezone_set: documentation ( source)
<?php
date_default_timezone_set('Europe/Berlin');
$date = new DateTime();
$date->setDate(2015, 10, 25);
$date->setTime(1, 30, 0);
$date2 = clone $date;
// Add two hours
$date->add(new DateInterval('PT2H'));
// Add two times one hour
$date2->add(new DateInterval('PT1H'));
$date2->add(new DateInterval('PT1H'));
echo "Spot the difference: ".$date->format(DateTime::ATOM)." <---> ".$date2->format(DateTime::ATOM)."\n";