X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FUtil%2FDateTimeFormat.php;h=e293857acdd14a937fbc45b19bffe31fc4aecfce;hb=3e51a23bd50327b3a2a9fd5401ff504f6d2b1d08;hp=31876d742b9419d8c45d342cbae31ffca4615b9e;hpb=724a58e79a664b65a3b68a4e3eb7fc88e1958af5;p=friendica.git diff --git a/src/Util/DateTimeFormat.php b/src/Util/DateTimeFormat.php index 31876d742b..e293857acd 100644 --- a/src/Util/DateTimeFormat.php +++ b/src/Util/DateTimeFormat.php @@ -109,6 +109,9 @@ class DateTimeFormat * months and days always start with 1. */ if (substr($s, 0, 10) <= '0001-01-01') { + if ($s < '0000-00-00') { + $s = '0000-00-00'; + } $d = new DateTime($s . ' + 32 days', new DateTimeZone('UTC')); return str_replace('1', '0', $d->format($format)); }