ID: 33362
User updated by: till at klimpong dot com
Reported By: till at klimpong dot com
Status: Open
Bug Type: Unknown/Other Function
Operating System: FreeBSD 5.2-current
PHP Version: 4.3.10
New Comment:
Forgot to add. I also set the locale on my system. Just to make sure
that this is not some weird conversion bug.
<?php
setlocale(LC_ALL, 'de_DE.ISO8859-1');
?>
Previous Comments:
------------------------------------------------------------------------
[2005-06-16 14:39:42] till at klimpong dot com
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 this bug report at http://bugs.php.net/?id=33362&edit=1