Bug in mktime-function ?

From: Date: Wed, 14 Feb 2001 16:29:36 +0000
Subject: Bug in mktime-function ?
Groups: php.windows 
Request: Send a blank email to php-windows+get-5565@lists.php.net to get a copy of this message
Hello PHP-users, given the following code snippet to convert ISO-date-strings to localized date-strings: <?php $stringArray = explode("-", "1985-01-01"); $month = $stringArray[1]; $day = $stringArray[2]; $year = $stringArray[0]; $date = mktime(0,0,0,$month,$day,$year); $value = strftime("%d.%m.%Y", $date); echo $value; ?> This code works fine as long as I use dates after 1970, all earlier dates result in an empty value. According to the docs, mktime is supposed to work fine with 4-digit dates. What is the problem here... Greetings, Dirk

« previous php.windows (#5565) next »