ID:               36763
 Updated by:       [EMAIL PROTECTED]
 Reported By:      nath2 dot munier at free dot fr
-Status:           Open
+Status:           Bogus
 Bug Type:         Date/time related
 Operating System: Mandrake10
 PHP Version:      4.4.2
 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

%G is the ISO year, not the "real" year. See http://no.php.net/strftime


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

[2006-03-16 21:28:34] nath2 dot munier at free dot fr

Description:
------------
After some incomprehensible bug, I focus on this test:

Any explanation ?

Reproduce code:
---------------
<?

$TmpYear = 2005;

$TestTs = mktime(0, 0, 0, 1, 2, $TmpYear);
echo "<br>Comp : ".strftime("%d %B %G %T", $TestTs);
echo "<br>jour : ".strftime("%d", $TestTs);
echo "<br>mois : ".strftime("%m", $TestTs);
echo "<br>anne : ".strftime("%G", $TestTs);
$TestTs = mktime(0, 0, 0, 1, 3, $TmpYear);
echo "<br>Comp : ".strftime("%d %B %G %T", $TestTs);
echo "<br>jour : ".strftime("%d", $TestTs);
echo "<br>mois : ".strftime("%m", $TestTs);
echo "<br>anne : ".strftime("%G", $TestTs);
?>



Expected result:
----------------
2005 for both for the year.

Actual result:
--------------
2004 for 1rst of january.
2005 for third january.
Same problem with 1999


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


-- 
Edit this bug report at http://bugs.php.net/?id=36763&edit=1

Reply via email to