- date_default_timezone_set: documentation ( source)
<?php
// set to UTC
date_default_timezone_set('UTC');
$now = new DateTime();
$now->setTime(23, 59, 59);
echo $now->format("Y-m-d H:i:s\n");
$bratislava = clone $now;
$bratislava->setTimezone('Europe/Bratislava');
echo $bratislava->format("Y-m-d H:i:s\n");