ID:               33362
 User updated by:  till at klimpong dot com
 Reported By:      till at klimpong dot com
-Status:           Bogus
+Status:           Open
 Bug Type:         FTP related
 Operating System: FreeBSD 5.2-current
 PHP Version:      4.3.10
 New Comment:

Well, the server's time is set to GMT+2 already. The server is in my
timezone and so on. So my local time and the server's time are the
same.

If the server is GMT+2, then the function returns it with GMT+4. Where
does the difference come from then?


Previous Comments:
------------------------------------------------------------------------

[2005-06-16 18:10:53] [EMAIL PROTECTED]

Yes, because your time is GMT+2.


------------------------------------------------------------------------

[2005-06-16 14:42:04] till at klimpong dot com

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');
?>

------------------------------------------------------------------------

[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

Reply via email to