here my code :
<?php
$aaa = array(
1224972000,
1224973800,
1224975600,
1224977400,
1224979200,
1224981000,
1224982800,
1224984600,
1224986400,
1224988200,
1224990000,
1224991800,
1224993600,
1224995400,
1224997200,
);
foreach ($aaa as $ts) {
$date = \date('m/d/Y,H:i:s', $ts);
echo "$date \n";
}
And the result is :
10/26/2008,00:00:00
10/26/2008,00:30:00
10/26/2008,01:00:00
10/26/2008,01:30:00
**10/26/2008,02:00:00
10/26/2008,02:30:00
10/26/2008,02:00:00
10/26/2008,02:30:00**
10/26/2008,03:00:00
10/26/2008,03:30:00
10/26/2008,04:00:00
10/26/2008,04:30:00
10/26/2008,05:00:00
10/26/2008,05:30:00
10/26/2008,06:00:00
Why ?
I'd imagine that in your chosen timezone, the date switches from Daylight Savings Time on that day, so there are two 2:00ams. I see you're studying in Liverpool -- would this be on a British machine? Last Sunday in October is traditionally the shift date between British Summer Time and Greenwich Mean Time. I believe that would also be the case for most of Europe.
Try adding:
date_default_timezone_set("UTC");
at the start of your script; that will fix the timezone to one without DST adjustments. You should find you get unique results.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With