ID: 32452 Updated by: [EMAIL PROTECTED] Reported By: arnoud dot kettenis at planet dot nl -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: Windows 2000 PHP Version: 4.3.10 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. > bogus Previous Comments: ------------------------------------------------------------------------ [2005-03-25 12:22:24] arnoud dot kettenis at planet dot nl used $event_formdate in stead of $event_fromdate ... i'm sorry!! ------------------------------------------------------------------------ [2005-03-25 12:19:07] arnoud dot kettenis at planet dot nl No error- ------------------------------------------------------------------------ [2005-03-25 12:15:25] arnoud dot kettenis at planet dot nl Description: ------------ Compare dates impossible with mktime. All if-statements return true, no matter the date. Reproduce code: --------------- <?php $event_fromdate = date("Y-m-d", mktime(0, 0, 0, 5, 1, 2005)); $event_todate = date("Y-m-d", mktime(0, 0, 0, 5, 10, 2005)); if ($event_todate >= $event_formdate) {echo ("<p>equal or larger</p>\n");}else {echo ("<p>smaller</p>\n");} $event_todate = date("Y-m-d", mktime(0, 0, 0, 5, 1, 2005)); if ($event_todate >= $event_formdate) {echo ("<p>equal or larger</p>\n");}else {echo ("<p>smaller</p>\n");} $event_todate = date("Y-m-d", mktime(0, 0, 0, 4, 10, 2003)); if ($event_todate >= $event_formdate) {echo ("<p>equal or larger</p>\n");}else {echo ("<p>smaller</p>\n");} ?> Expected result: ---------------- equal or larger equal or larger smaller Actual result: -------------- equal or larger equal or larger equal or larger ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32452&edit=1