$time1 = strtotime(date("Y-m-d", time()));
$time2 = strtotime(date("Y-m-d", time()));
$time1 = $time1 + (7 * 24 * 60 * 60);
$time2 = strtotime(date("Y-m-d", $time2) . " +1 week");
The second line and third line obviously doing different things in my code. That is when i am processing a date which is older than a month. Is it supposed to be like that ? And why is it doing that ?
The difference is that
adds 7 × 24 hours, whereas
adds one week.
Normally, of course, those are the same thing, but your profile says that you live in New Zealand, and Wikipedia says that New Zealand switches from daylight-saving-time to regular time on the first Sunday in April, which was yesterday (or, er, two days ago for you). So it may recently have been the case for you that one week was actually 7 × 24 + 1 hours (because the hour from 2:00 to 3:00 AM on April 1st happened twice), instead of 7 × 24 hours.
Similarly, in the spring you’ll find that one week can be 7 × 24 − 1 hours.