I wish to achieve this same date format from javascript in php:
moment().format('YYYY-MM-DD\THH:mm:ssZ');
output: 2016-12-24T13:46:43-05:00
I'm trying to get the same result, but I've only gotten the following:
$date = new DateTime();
echo $date->format('Y-m-d\TH:i:s-ssZ');
output: 2022-09-22T14:42:28-28280
I don't know if the procedure is correct, but I want to get the same javascript date format but in PHP, what changes should I add to my code?