There is sample code
<?php $dt = new \DateTime(); $dt->setTimezone(new \DateTimeZone('Europe/London')); $timestamp = 1351383400; echo "$timestamp \n"; $dt->setTimestamp($timestamp); echo $dt->getTimestamp();
which displays 2 different timestamps 1351383400 (Sun, Oct 28, 2012 01:16:40 +0100, just before switching DST) and 1351387000 (Sun, October 28, 2012) 01:16:40 +0000, 1 hour after the switch DST)
The question is, how can I get the timestamp receiver to return the exact same integer that was passed to line 1 of the Timestamp line before?
PHP 5.3.6
php datetime unix-timestamp dst
Alex blex
source share