note 38608 rejected from function.date by didou

From: Date: Tue, 30 Dec 2003 07:34:14 +0000
Subject: note 38608 rejected from function.date by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-62665@lists.php.net to get a copy of this message
Note Submitter: jeffk@jdkoftinoff.com ---- The examples here have an insidious problem. The following code assumes that date() always return values of the same date. But the current time is always changing: mktime(0,0,0,date("m"),date("d"),date("Y")) It is wrong when the three calls to date() straddle midnight at the end of a month. For proper date calculations you should get all the values of the current date in one function call to date() or time(). --jeff++

« previous php.notes (#62665) next »