Date pour sitemap

$lastmod = '2012-11-28 10:53:17'; //MySQL datetime format

$datetime = new DateTime($lastmod);
$result = $datetime->format('Y-m-d\TH:i:sP');

echo $result; //2012-11-28T10:53:17+01:00

Leave feedback about this

  • Rating
Choose Image