- time: documentation ( source)
- date_default_timezone_set: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
<?php
date_default_timezone_set('Europe/Prague');
$t = time() - 24*60*60;
$t1 = strtotime("next month", $t);
$t2 = strtotime("first day of next month", $t);
echo date("d.m.Y", $t) . ": $t\n";
echo date("d.m.Y", $t1) . ": $t1\n";
echo date("d.m.Y", $t2) . ": $t2\n";