mktime(0,0,0,0,0,0)

From: Date: Thu, 13 Jul 2000 12:04:47 +0000
Subject: mktime(0,0,0,0,0,0)
Groups: php.dev 
Request: Send a blank email to php-dev+get-24433@lists.php.net to get a copy of this message
in earlier versions of PHP (e.g. 3.0.14), mktime(0,0,0,0,0,0) returned -1 but the Y2K patch applied to this function somewhere after 3.0.14 combined with the willingness of the underlying mktime from libc to try make sense of illegal month and day numbers will now result in a timestamp representing November 30th 1999 ( one month and one day before 1.1.2000 due to the zero values in month and day and the interpretation of year '0' as 2000 instead of 1900 ) now my question is: shall this be left 'as is' (i don't think so), shall only a 0/0/0 combination result in an error (i'd prefere this) or shall PHP mktime break with C mktime and reject illegal input values for day and month alltogether (i'm not so sure about this one) i have a patch for rejecting only 0/0/0 ready for php 3 & 4, but i'd like to get feedback _before_ i possibly break things for anybody ... by the way, could someone please test how Windows mktime behaves? -- Hartmut Holzgraefe hartmut@six.de http://www.six.de +49-711-99091-62 fax:-99

« previous php.dev (#24433) next »