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

From: Date: Wed, 31 May 2006 09:10:45 +0000
Subject: #37650 [Opn->Bgs]: Two Calender Functions not corresponding
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-97847@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:           Bogus
 Bug Type:         Date/time related
 Operating System: Windows XP
 PHP Version:      5.0.3
 New Comment:

Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.




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

[2006-05-31 08:51:01] martin at whitewallweb dot com

My apologies, Noticed I selected the wrong PHP version,Using 5.0.3.
date_default_timezone_get() does not exist. (Local time is +2
GMT(athenes)).Is there an alternative function I should call for this
information? 

Has this been sorted out in 5.1.4?

------------------------------------------------------------------------

[2006-05-31 08:36:53] derick@php.net

Hei,

what does:

echo date_default_timezone_get(), "\n";

show in that same script?

------------------------------------------------------------------------

[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 (#97847) next »