php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #47091 ftp_mdtm adjusts for local timezone
Submitted: 2009-01-13 18:30 UTC Modified: 2021-02-19 15:28 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: qwertywin at gmail dot com Assigned: cmb (profile)
Status: Closed Package: FTP related
PHP Version: 5.2.8 OS: Redhat ES5
Private report: No CVE-ID: None
 [2009-01-13 18:30 UTC] qwertywin at gmail dot com
Description:
------------
ftp_mdtm receives the file modified time via the MDTM ftp command

it then proceeds to adjust this timestamp to the current systems 
timezone, which is a very bad assumption to make as ftp's are non-
standard in there handling of whether the timestamp is GMT/Local

Thus the modification is compounding the problem.

Reproduce code:
---------------
refer to \ext\ftp\ftp.c   ftp_mdtm

Expected result:
----------------
the timestamp recieved from the ftp server.

Actual result:
--------------
the timestamp adjusted.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-08 20:41 UTC] jani@php.net
-Package: Feature/Change Request +Package: FTP related
 [2021-02-19 15:28 UTC] cmb@php.net
-Summary: ftp_mdtm incorrectly adjusts for timezone +Summary: ftp_mdtm adjusts for local timezone -Type: Feature/Change Request +Type: Documentation Problem -Assigned To: +Assigned To: cmb
 [2021-02-19 15:28 UTC] cmb@php.net
> […] as ftp's are non-standard in there handling of whether the
> timestamp is GMT/Local

While that still may be true in practice, RFC 3659, section 3.4[1]
is explicit:

| The times are in GMT, […]

Anyhow, given ftp_mdtm() always worked this way, and that fmtime()
also returns local timestamps, I don't see that this will ever
change, so changing to documentation issue.

If you still feel strongly about this, please pursue the RFC
process[2].

[1] <https://tools.ietf.org/html/rfc3659#section-3.4>
[2] <https://wiki.php.net/rfc/howto>
 [2021-02-19 15:40 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=def2d256ef5806ca6e7b59e05b8ee312e3703a0f
Log: Fix #47091: ftp_mdtm adjusts for local timezone
 [2021-02-19 15:40 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 [2021-02-19 20:15 UTC] mumumu@php.net
Automatic comment on behalf of mumumu@mumumu.org
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=942b7fe3f1d650222704ab818451598a235168b8
Log: Fix #47091: ftp_mdtm adjusts for local timezone
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 04:01:31 2024 UTC