ID: 48940 User updated by: trizt at iname dot com Reported By: trizt at iname dot com Status: Bogus Bug Type: Date/time related Operating System: Linux PPC 32bit PHP Version: 5.2.10 New Comment:
Didn't find any results on similar bugs when I made the search before writing this one. Had been nice if you could have made this a duplicate of original bug, or at least give the bug id. Previous Comments: ------------------------------------------------------------------------ [2009-07-16 07:07:58] scott...@php.net Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Thank you for your interest in PHP. Fixed in CVS already, you can use a CVS copy or wait until 5.2.11 is out or use 5.3.0 which has it fixed. ------------------------------------------------------------------------ [2009-07-16 06:16:05] trizt at iname dot com 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 this bug report at http://bugs.php.net/?id=48940&edit=1