note 8733 deleted from function.date by jimw

From: Date: Fri, 02 Nov 2001 00:42:00 +0000
Subject: note 8733 deleted from function.date by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-20054@lists.php.net to get a copy of this message
A few posts back there's a little tip about calculating the difference between two dates by calculating the timestamps for each and then dividing the difference by the number of seconds in one day (86,000 or so). However, as I found out, if you're living in a country that uses daylight saving time come winter, then between certain dates you're gonna gain an hour/lose an hour, which might cause unexpected results. In my case I was rounding up the number of days (it was to do with rental periods) and what appeared to be exactly one day (12:00 one day to 12:00 the next) actually calculated as 2. Clever ol' PHP. Stoopid ol' me ;-)

« previous php.notes (#20054) next »