ID: 30331 Updated by: [EMAIL PROTECTED] Reported By: grumiche at powers dot com dot br -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: AIX 5.1 PHP Version: 4.3.9 New Comment:
Why is this wrong? You're using -3 as parameter... what's the point of that? The -3rd october is also sept. 27th which is what your mktime call resolves too: php -r 'echo date("Y-m-d H:i:s", mktime(2,0,0,10,1 - (5 - 1), 2004,1));' 2004-09-27 02:00:00 No bug here -> bogus. Previous Comments: ------------------------------------------------------------------------ [2004-10-05 20:53:13] grumiche at powers dot com dot br Description: ------------ Function mktime returns wrong date. Problem found when installing eGroupWare at AIX. Machine: IBM RISC 6000 e30 OS: AIX 5.1 Maintenance Level 6 PHP 4.3.9 Apache 1.3.29-1 Without changes on php.ini. Compiled modules: '/configure' '--with-apxs=/opt/freeware/apache/sbin/apxs' '--with-mysql' '--enable-trackvars' '--with-ldap' '--with-gettext=/opt/freeware' '--with-mbstring' '--with-pear' '--with-gd=/opt/freeware' '--with-zlib=/opt/freeware' '--with-freetype-dir=/opt/freeware' '--with-ttf=/opt/freeware' '--enable-mbstring' '--with-jpeg-dir=/opt/freeware' '--with-png-dir=/opt/freeware' '--with-zlib-dir=/opt/freeware' Same error apears on another installation: Machine: IBM RISC 6000 43P OS: AIX 5.1 Maintenance Level 3 PHP 4.3.8 Apache 1.3.29-1 Without changes on php.ini. Compiled modules: './configure' '--with-apxs=/opt/freeware/apache/sbin/apxs' '--with-mysql' '--enable-trackvars' '--with-ldap' '--with-gettext=/opt/freeware' '--with-mbstring' '--with-pear' '--with-openssl=/opt/freeware' '--with-gd=/opt/freeware' '--with-zlib=/opt/freeware' Reproduce code: --------------- mktime(2,0,0,10,1 - (5 - 1), 2004,1) Expected result: ---------------- 1096261200 Actual result: -------------- 1096520400 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30331&edit=1