I have come up with a day comparison script and it worked fine until daylight saving kicked in. Now all the dates i insert into my database are 1 hour faster. So current date plus 7 days = 7 days + 1 hour. How do i solve this? The code below shows what i am trying to do.
<?php
$when = time (void);
echo $when;
$nextWeek = date(strtotime("+7 days"));
echo "<br />";
echo $nextWeek;
echo "<br />";
$date = $when;
$date2 = $nextWeek;
$newdate = strftime($date2 - $date);
echo date('d',($newdate))."Days";
echo date('H',($newdate))."Hours";
echo date('i',($newdate))."Minutes";
?>
Now i cant get rid of that one hour that has just appeared.
Can anyone advise me on how to fix this please?