|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-10-05 20:53 UTC] 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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 07:00:01 2025 UTC |
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.