- date_default_timezone_set: documentation ( source)
<?php
date_default_timezone_set('Europe/Prague');
$tz = new \DateTimeZone('UTC');
$date = new \DateTime('2016-05-05 midnight', $tz);
echo $date->format('c');
echo PHP_EOL;
$date->modify('first day of this month midnight');
$date->modify('-2 months');
$date->modify('last day of this month');
echo $date->format('c');