Hi all,
I've been trawling through posts trying to get some help with this issue. I have a database that is storing unix timestamps as integers. I recently came across a conversion issue with two of the stored time stamps they are 2752 seconds apart but when converted shows the later one as 8 minutes earlier.
Here is some code I've been playing with,
$timey = new DateTime();
$timey->setTimestamp(1401808214);
echo $timey->getTimestamp();
echo $timey->format('M jS \'y g:sa:');
$timey->setTimestamp(1401810966);
echo $timey->getTimestamp();
echo $timey->format('M jS \'y g:sa:');
The output I get is
1401808214Jun 3rd '14 5:14pm:1401810966Jun 3rd '14 5:06pm:
Any help with this would be greatly appreciated.