. * * ========================= * * This file contains the class DateTime * * @category API * @package DmarcSrg * @author Aleksey Andreev (liuch) * @license https://www.gnu.org/licenses/gpl-3.0.html GNU/GPLv3 */ namespace Liuch\DmarcSrg; /** * This class extends the standard class to get ISO 8601 value in json_encode. */ class DateTime extends \DateTime implements \JsonSerializable { public function jsonSerialize(): string { return $this->format(\DateTime::ATOM); } }