Helper date function return different when input timestamp
Permalink
Can anyone explain why this function return different ?
$dh = Core::make('helper/date'); echo date('Y-m-d H:i:s'); // 2016-06-20 14:25:17 echo $dh->date('Y-m-d' ,strtotime(date('Y-m-d'))); // 2016-06-19 echo $dh->date('Y-m-d' ,date('Y-m-d')); // 2016-06-20 echo $dh->date('Y-m-d H:i:s' ,strtotime(date('Y-m-d H:i:s'))); // 2016-06-20 12:25:17 echo $dh->date('Y-m-d H:i:s' ,date('Y-m-d H:i:s')); // 2016-06-20 14:25:17 echo $dh->formatDate(strtotime(date('Y-m-d')), true); // 20. jun. 2016 echo $dh->formatDate(date('Y-m-d'), true); // 20. jun. 2016 echo $dh->formatDateTime(strtotime(date('Y-m-d H:i:s')), true); // 20. jun. 2016 14.25 echo $dh->formatDateTime(date('Y-m-d H:i:s'), true); // 20. jun. 2016 16.25