Edit report at http://bugs.php.net/bug.php?id=51240&edit=1
ID: 51240 User updated by: w-pfeiffer-tue at gmx dot de Reported by: w-pfeiffer-tue at gmx dot de Summary: date / mktime gives different dates for same parameters Status: Bogus Type: Bug Package: Date/time related Operating System: windows xp sp3 PHP Version: 5.2.13 New Comment: thanks. :-) Previous Comments: ------------------------------------------------------------------------ [2010-03-08 19:46:30] der...@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php 09 starts with 0, which is the start of an octal number. Octal number 09 is invalid so turned into 0. ------------------------------------------------------------------------ [2010-03-08 19:25:39] w-pfeiffer-tue at gmx dot de Description: ------------ the date / mktime gives different dates although the parameters have the same value Test script: --------------- php -r "echo date('d.m.Y', mktime(0,0,0, 3,9,2010));" > 09.03.2010 php -r "echo date('d.m.Y', mktime(0,0,0, 3, 09,2010));" > 28.02.2010 Expected result: ---------------- php -r "echo date('d.m.Y', mktime(0,0,0, 3,9,2010));" > 09.03.2010 php -r "echo date('d.m.Y', mktime(0,0,0, 3, 09,2010));" > 28.02.2010 Actual result: -------------- php -r "echo date('d.m.Y', mktime(0,0,0, 3,9,2010));" > 09.03.2010 php -r "echo date('d.m.Y', mktime(0,0,0, 3, 09,2010));" > 28.02.2010 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51240&edit=1