I'm aware that the time change is occuring in this hour. Why am I getting back 3 instead of 2? Thanks.
Some test lines:
<?php
echo(strftime("%a %m/%d/%y %I:%M %p",(strtotime("3/9/2008 2:00:00 AM"))));
echo " --- ";
echo(strftime("%m/%d/%y %I:%M %p",(strtotime("Mar 9 2008 2:00AM"))));
echo " --- ";
echo(strtotime("-2 days ",strtotime("03/09/08")));
echo " --- ";
echo(strtotime("-2 days ", 1205042400));
echo " --- ";
echo(strtotime("3/9/2008 2:00:00 AM"));
echo " --- ";
echo(strtotime("Mar 9 2008 2:00AM"));
?>
Output:
Sun 03/09/08 03:00 AM --- 03/09/08 03:00 AM --- 1204869600 --- 1204869600 --- 1205049600 --- 1205049600
DST issues and strtotime or strftime
Moderator: General Moderators