获得接下来4天的日期

The following code worked before, but failed to get the next 4 days of today 2011-11-04

$draw_date = '2011-11-04';
$ts = strtotime($draw_date) + 86400*4;

$ddate = date('Y-m-d', $ts);
echo $ddate;

The code above print 2011-11-07, but what I expected is 2011-11-08. It works if I set draw_date = '2011-10-04' or '2011-12-04'. Very weird! Can anyone explain why?

Thanks in advance.

Don't forget there's a DST switchover on November 6th. That makes 4days-from-now actually be 86400*4 + 3600 for the extra hour.

You can use:

$ts = strtotime($draw_date) ;
strtotime('+4 day', $ts);