<?php
echo date_default_timezone_get() ."\n";
$at = '@';
$epochTime = '1490281920';
$timeZone = new DateTimeZone('Europe/Brussels');
$date = new DateTime($at.$epochTime);
$dateWithZone = new DateTime($at.$epochTime, $timeZone);
echo date('Y-m-d H;i:s', $epochTime)."\n";
echo $date->format('Y-m-d H:i:s')."\n";
echo $dateWithZone->format('Y-m-d H:i:s')."\n";
- Output for 5.6.38, 7.0.0 - 7.0.33, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
- Europe/Amsterdam
2017-03-23 16;12:00
2017-03-23 15:12:00
2017-03-23 15:12:00
- Output for 7.3.32 - 7.3.33, 8.0.13
- UTC
2017-03-23 15;12:00
2017-03-23 15:12:00
2017-03-23 15:12:00
preferences:
160.95 ms | 401 KiB | 218 Q