note 38363 added to function.date

From: Date: Thu, 18 Dec 2003 07:18:38 +0000
Subject: note 38363 added to function.date
Groups: php.notes 
Request: Send a blank email to php-notes+get-62152@lists.php.net to get a copy of this message
Do NOT call the date() function in multiple time for a ONE date-time. For bad example: $today = mktime (0,0,0,date("m") ,date("d"), date("Y")); If current date-time is 1999-12-31 23:59:59.999..., first date("m") returns "12", but second date("d") and third date("Y") might return "01" and "2000"! If so, value of the $today is UNIX timestamp at 2000-12-01 00:00:00.00. ---- Manual Page -- http://www.php.net/manual/en/function.date.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+38363 Delete -- http://master.php.net/manage/user-notes.php?action=delete+38363&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+38363&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#62152) next »