From: trizt at iname dot com Operating system: Linux PPC 32bit PHP version: 5.2.10 PHP Bug Type: Date/time related Bug description: date('Y') generates 0000 while date('y') generates 09
Description: ------------ On Linux PPC 32bit (Gentoo with following options: apache2 bcmath berkdb bzip2 cjk cli crypt ctype curl curlwrappers exif ftp gd gdbm iconv imap json ldap mhash mysql mysqli ncurses nls pcntl pcre posix readline reflection session simplexml snmp soap sockets spl ssl suhosin tidy tokenizer truetype unicode wddx xml xmlreader xmlrpc xmlwriter xpm xsl yaz zip zlib), the date('Y') don't generate the current year, but 0000. A simple but not that nice work around is to make '20'.date('y') Using the date('Y') works on my x86_64, so I think the bug may be in just big endian machines (haven't tested this on my sparc yet). Reproduce code: --------------- <?php echo date('Y'); ?> Expected result: ---------------- 2009 Actual result: -------------- 0000 -- Edit bug report at http://bugs.php.net/?id=48940&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48940&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48940&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48940&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48940&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48940&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48940&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48940&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48940&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48940&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48940&r=support Expected behavior: http://bugs.php.net/fix.php?id=48940&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48940&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48940&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48940&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48940&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48940&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48940&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48940&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48940&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48940&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48940&r=mysqlcfg