I have this string object in my php array
string
\"2013-03-05 00:00:00+00\"
I would like to add 12 hours to the entry within PHP, then save it back to
If you have dynamic interval, this way will avoid errors of wrong format for $dateDiff:
$dateDiff = "12 hours"; $interval = DateInterval::createFromDateString($dateDiff); $date = new DateTime("2013-03-05 00:00:00+00"); $date->add($interval); echo $date->format("Y-m-d H:i:sO");