Bug #51240 [Opn->Bgs]: date / mktime gives different dates for same parameters

From: Date: Mon, 08 Mar 2010 18:46:30 +0000
Subject: Bug #51240 [Opn->Bgs]: date / mktime gives different dates for same parameters
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-148403@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=51240&edit=1

 ID:               51240
 Updated by:       derick@php.net
 Reported by:      w-pfeiffer-tue at gmx dot de
 Summary:          date / mktime gives different dates for same
                   parameters
-Status:           Open
+Status:           Bogus
 Type:             Bug
 Package:          Date/time related
 Operating System: windows xp sp3
 PHP Version:      5.2.13

 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------
[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


Thread (3 messages)

« previous php.bugs (#148403) next »