Hello there. I am kind of confused. In PHP I substract two unix timestamps from each other.
The first: mktime(0, 0, 0, 10, 22, 2012)
The second: mktime(24, 0, 0, 10, 28, 2012)
For as far as I know the time difference between these two timestamps is exactly 7 days. What I get, however, when I substract the second from the first ($time_difference = $second_timestamp - $first_timestamp) and then divide it by a week (60 * 60 * 24 * 7) is not 1, but 1.0059523809524 (which equals 1 week and 1 hour)!
Yea I noticed :). But mktime(24, 0, 0, 10, 28, 2012) returned exactly the same as mktime(0, 0, 0, 10, 29, 2012), and both are not working.. :( I live in Holland and we have daylight saving time here as well, but wouldn't that mean that an hour should automatically be added to the first timestamp as well instead of only to the second one?
Edit: Oh nvm, I get it, daylight saving time ends just before my end date.. Right.. Thanks ^^! Good to know.
BTW mktime() can utilize overflow and underflow - such as mktime(25,0,0, 10, 28, 2012) - which WILL work, and can be extremely useful - BUT this can often lead to confusion when dealing with '24', as (as you know) there is no 24:00:00.