From: nath2 dot munier at free dot fr
Operating system: Mandrake10
PHP version: 4.4.2
PHP Bug Type: Date/time related
Bug description: Strftime bug
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 bug report at http://bugs.php.net/?id=36763&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=36763&r=trysnapshot44
Try a CVS snapshot (PHP 5.1):
http://bugs.php.net/fix.php?id=36763&r=trysnapshot51
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=36763&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36763&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=36763&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36763&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36763&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36763&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36763&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36763&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=36763&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=36763&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36763&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36763&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36763&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36763&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36763&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36763&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36763&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36763&r=mysqlcfg