- 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;
echo date("01.m.Y", strtotime("next month", $t));
echo "\n";
echo date("d.m.Y", strtotime("first day of next month", $t));