#37650 [Opn->Fbk]: Two Calender Functions not corresponding

From: Date: Wed, 31 May 2006 08:36:53 +0000
Subject: #37650 [Opn->Fbk]: Two Calender Functions not corresponding
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-97843@lists.php.net to get a copy of this message
 ID:               37650
 Updated by:       derick@php.net
 Reported By:      martin at whitewallweb dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Date/time related
 Operating System: Windows XP
 PHP Version:      5.1.4
 New Comment:

Hei,

what does:

echo date_default_timezone_get(), "\n";

show in that same script?


Previous Comments:
------------------------------------------------------------------------

[2006-05-31 08:23:56] martin at whitewallweb dot com

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 this bug report at http://bugs.php.net/?id=37650&edit=1


Thread (7 messages)

« previous php.bugs (#97843) next »