From: till at klimpong dot com Operating system: FreeBSD 5.2-current PHP version: 4.3.10 PHP Bug Type: Unknown/Other Function Bug description: ftp_mdtm does not return correct date
Description: ------------ ftp_mdtm always returns a wrong unix timestamp. Our FTPd is proftpd (with TimesGMT off). The date, time and timezone are set correctly on the server. When I connect to the FTP with another client (such as filezilla), all dates are displayed correct. This error only occurs within a PHP script. For example: current time on the server: 2:24PM current time returned by ftp_mdtm: 4:24 PM This example works: <?php echo strftime("%d.%m.%Y - %H:%M"); ?> Displays the correct time, so I guess this problem comes from ftp_mtdm(). Reproduce code: --------------- <?php $file = 'somefile.foo'; $ts = file_mtdm($file); echo strftime("%d.%m.%Y - %H:%M", $ts); ?> Expected result: ---------------- File's modification time. Actual result: -------------- The file's modification time plus two hours. -- Edit bug report at http://bugs.php.net/?id=33362&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33362&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33362&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33362&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33362&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33362&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33362&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33362&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33362&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33362&r=support Expected behavior: http://bugs.php.net/fix.php?id=33362&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33362&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33362&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33362&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33362&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33362&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33362&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33362&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33362&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33362&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33362&r=mysqlcfg