From:             martin at whitewallweb dot com
Operating system: Windows XP
PHP version:      5.1.4
PHP Bug Type:     Date/time related
Bug description:  Two Calender Functions not corresponding

Description:
------------
PHP mktime generated timestamps in date function do not return same output
as mktime input.

Reproduce code:
---------------
echo date('d m Y',mktime(0, 0, 0, 6, 20, 1948)); output: 21 06 1948

echo date('d m Y',mktime(0, 0, 0, 6, 03, 1944)); output: 04 06 1944

echo date('d m Y',mktime(0, 0, 0, 6, 19, 1960)); output: 20 06 1960

echo date('d m Y',mktime(0, 0, 0, 6, 28, 1956)); output: 29 06 1956

echo date('d m Y',mktime(0, 0, 0, 8, 31, 1952)); output: 01 09 1952

echo date('d m Y',mktime(0, 0, 0, 5, 27, 1960)); output: 28 05 1960

echo date('d m Y',mktime(0, 0, 0, 7, 31, 1960)); output: 01 08 1960


Expected result:
----------------
echo date('d m Y',mktime(0, 0, 0, 6, 20, 1948)); output: 20 06 1948

echo date('d m Y',mktime(0, 0, 0, 6, 03, 1944)); output: 03 06 1944

echo date('d m Y',mktime(0, 0, 0, 6, 19, 1960)); output: 19 06 1960

echo date('d m Y',mktime(0, 0, 0, 6, 28, 1956)); output: 28 06 1956

echo date('d m Y',mktime(0, 0, 0, 8, 31, 1952)); output: 31 08 1952

echo date('d m Y',mktime(0, 0, 0, 5, 27, 1960)); output: 27 05 1960

echo date('d m Y',mktime(0, 0, 0, 7, 31, 1960)); output: 31 08 1960


Actual result:
--------------
echo date('d m Y',mktime(0, 0, 0, 6, 20, 1948)); output: 21 06 1948

echo date('d m Y',mktime(0, 0, 0, 6, 03, 1944)); output: 04 06 1944

echo date('d m Y',mktime(0, 0, 0, 6, 19, 1960)); output: 20 06 1960

echo date('d m Y',mktime(0, 0, 0, 6, 28, 1956)); output: 29 06 1956

echo date('d m Y',mktime(0, 0, 0, 8, 31, 1952)); output: 01 09 1952

echo date('d m Y',mktime(0, 0, 0, 5, 27, 1960)); output: 28 05 1960

echo date('d m Y',mktime(0, 0, 0, 7, 31, 1960)); output: 01 08 1960

-- 
Edit bug report at http://bugs.php.net/?id=37650&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=37650&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=37650&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=37650&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=37650&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=37650&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=37650&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=37650&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=37650&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=37650&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=37650&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=37650&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=37650&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=37650&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=37650&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=37650&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=37650&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=37650&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=37650&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=37650&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=37650&r=mysqlcfg

Reply via email to