<?php //Prior 8.1 for php +1 month https://www.php.net/manual/en/datetime.examples-arithmetic.php function printDiff($tz) { $d1 = new \DateTime("2015-06-01", new \DateTimeZone($tz)); $d2 = new \DateTime("2015-07-01", new \DateTimeZone($tz)); $diff = $d1->diff($d2); print($diff->format("Start: " . ((new \DateTime('@'.($d1->format("U"))))->format("Y-m-d H:i:s")) . " End: " . ((new \DateTime('@'.($d2->format("U"))))->format("Y-m-d H:i:s")) . " Year: %Y Month: %M Day: %D") .PHP_EOL); } \printDiff("UTC"); \printDiff("Australia/Melbourne");
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`