#19620 [Bgs]: wrong date

From: Date: Thu, 26 Sep 2002 22:34:00 +0000
Subject: #19620 [Bgs]: wrong date
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-20493@lists.php.net to get a copy of this message
ID: 19620 Updated by: hholzgra@php.net Reported By: rsmeurer@terra.com.br Status: Bogus Bug Type: Date/time related Operating System: FREE BSD 4.6 PHP Version: 4.2.1 New Comment: we really need a quickfix entry for this ... :( due to daylight saving time there is no such date as 2002-10-13 00:00:00 in brazil the second following 2002-10-12 23:59:59 is 2002-10-13 01:00:00 so you requested the timestamp for an invalid date, which is -1 and then you passed that on without checking to the date function, which took it as "the second before the unix epoch", being 1969-12-31 23:59:59 Previous Comments: ------------------------------------------------------------------------ [2002-09-26 13:55:46] tal@php.net Sorry, but the bug system is not the appropriate forum for asking support questions. 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 Thank you for your interest in PHP. ------------------------------------------------------------------------ [2002-09-26 13:51:21] rsmeurer@terra.com.br // why is this returning 1969-12-31 ??? $day = 13; $month = 10; $year = 2002; echo date("Y-m-d",mktime (0,0,0,$month,$day,$year)); And MySQL also does the same when I insert '2002-10-13' in a date field!!! ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19620&edit=1

« previous php.bugs (#20493) next »