$date = new DateTime("now", new DateTimeZone('Europe/Berlin') );
$dateUpdate = $date->format("d.m.Y H:i:s");
Hey, i need to subtract 4 Minutes from $dateUpdate
.
How is this possible?
Thanks
You can do it this way :
$date = new DateTime("now", new DateTimeZone('Europe/Berlin'));
$interval = new DateInterval("PT4M");
$date->sub($interval);
echo $date->format('Y-m-d\TH:i:s.u');