ID: 28562 Updated by: [EMAIL PROTECTED] Reported By: aksuska at esoteritech dot com -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: Linux 2.4.25 (RH) PHP Version: 4.3.4 New Comment:
You use "m" for both Month and Minute, while you need to use "i" for Minute. Previous Comments: ------------------------------------------------------------------------ [2004-05-30 21:22:35] aksuska at esoteritech dot com It might help if you look at my examples more closely. There is no 5 hour discrepancy anywhere.There is a 3 minute, 5 minute, and 22 minute discrepancy. I can't see how this can be due to a time zone variance. ------------------------------------------------------------------------ [2004-05-30 19:49:43] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php When you don't specify the time, the timezone information is used, hence the extra 5 hours. ------------------------------------------------------------------------ [2004-05-28 19:51:57] aksuska at esoteritech dot com Description: ------------ Time values are (IMHO) calculated incorrectly from strtotime(), or as passed through date(). See example below. Config: --------------------------- './configure' '--prefix=/usr/local/' '--with-apxs=/etc/ httpd/bin/apxs' '--disable-cgi' '--enable-versioning' '-- enable-pic' '--disable-posix-threads' '--enable-memory- limit' '--with-pear=/usr/local/lib/php' '--with-openssl=/ usr/local/ssl' '--disable-debug' '--enable-magic-quotes' '- -disable-rpath' '--with-bz2=/usr' '--with-zlib' '--enable- bcmath' '--enable-calendar' '--enable-ftp' '--enable-exif' '--with-curl=/usr' '--enable-dba' '--with-gdbm=/usr' '-- with-flatfile' '--with-inifile' '--enable-dbase' '--with- gd' '--enable-gd-native-ttf' '--with-jpeg-dir=/usr' '-- with-png-dir=/usr' '--with-freetype-dir=/usr' '--with- gettext=/usr' '--with-gmp' '--with-imap=/usr/local' '-- with-imap-ssl=/usr/local/ssl' '--enable-mbstring' '-- enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt=/ usr' '--with-mhash=/usr' '--with-unixODBC=/usr/local/ unixODBC' '--with-mysql=/usr/local/mysql' '--enable- sockets' '--with-regex=system' '--enable-wddx' '--with- expat-dir=/usr' '--enable-xslt' '--with-xslt-sablot=/usr' '--enable-inline-optimization' '--with-pspell=/usr/local' ---------------- php.ini diff: ------------------- I can't provide this as the server isn't mine. I canb, however, provide a phpinfo() output on request. -------------------- Reproduce code: --------------- <? $date = '3/31/04'; print date( 'Y-m-d H:m:s', strtotime( $date ) ) . "<BR>"; $date = date( 'm/d/y', time() ); print date( 'Y-m-d H:m:s', strtotime( $date ) ) . " ($date)<BR>"; $date = '03/31/04 00:00:00'; print date( 'Y-m-d H:m:s', strtotime( $date ) ) . "<BR>"; $date = '03/31/04 03:25:19'; print date( 'Y-m-d H:m:s', strtotime( $date ) ) . "<BR>"; ?> Expected result: ---------------- 2004-03-31 00:00:00 2004-05-28 00:00:00 (05/28/04) 2004-03-31 00:00:00 2004-03-31 03:25:19 Actual result: -------------- 2004-03-31 00:03:00 2004-05-28 00:05:00 (05/28/04) 2004-03-31 00:03:00 2004-03-31 03:03:19 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28562&edit=1
