<?php
$date = date(YmdHis);
$gmdate = gmdate(YmdHis);

echo sprintf("date - %02s/%02s/%04s %02s:%02s:%02s", substr($date,4,2),substr($date,6,2),substr($date,0,4),substr($date,8,2),substr($date,10,2),substr($date,12,2));
echo "<br>";
echo sprintf("gmdate - %02s/%02s/%04s %02s:%02s:%02s", substr($gmdate,4,2),substr($gmdate,6,2),substr($gmdate,0,4),substr($gmdate,8,2),substr($gmdate,10,2),substr($date,12,2));
?>
