php date rfc format code example
Example 1: datetime php
$dateTime = new \DateTime();
$dateTime->format('Y-m-d H:i:s');
Example 2: php date format iso
echo date(DATE_ISO8601, strtotime('2010-12-30 23:21:46'));
$dateTime = new \DateTime();
$dateTime->format('Y-m-d H:i:s');
echo date(DATE_ISO8601, strtotime('2010-12-30 23:21:46'));