commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Fu (JIRA)" <j...@apache.org>
Subject [jira] Commented: (NET-140) FTPClient listFiles returns incorrect timestamp on freshly uploaded file but corrects itself after about 15 minutes
Date Wed, 01 Apr 2009 09:03:13 GMT

    [ https://issues.apache.org/jira/browse/NET-140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12694427#action_12694427
] 

James Fu commented on NET-140:
------------------------------

Hi

I still see this timestamp-display-incorrect issue even when using commons-net-2.0.jar.
Any newly uploaded file in year 2009 will be displayed as year 2008, and on the next day,
it will display as year 2009 correctly.

I've read articles about issue NET-140 and related NET-159, it seems that this issue has already
been fixed? I've tried the following code segments and it seems to have been resolved, just
wonder if this is the official way to handle this issue.

        FTPClientConfig conf = new FTPClientConfig(FTPClientConfig.SYST_UNIX);
        conf.setLenientFutureDates(true);        
        this.ftp.configure(conf);



> FTPClient listFiles returns incorrect timestamp on freshly uploaded file but corrects
itself after about 15 minutes
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: NET-140
>                 URL: https://issues.apache.org/jira/browse/NET-140
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 1.4
>         Environment: Windows local client site, Linux remote server site
>            Reporter: Bill Giel
>             Fix For: 2.0
>
>
> This is an odd one:
> We upload GPS data each hour to a public site using FTPClient. Every 24 hours we check
for files older than 60 days using listFiles and getting the timestamps do decide if we want
to delete older files.
> When we list the files, the most recently uploaded files have a time stamp exactly one
year too old. After about 15 minutes, it seems to correct itself and eventually displays the
correct timestamp.
> During this time while FTPFile.getTimestamp is giving the incorrect timestamp, browsing
the folder with a web browser, a commercial FTP client, or actually checking the file info
in a shell shows the correct timestamp (i.e. does not seem to be a problem on the remote site)
> commons-net-1.4.1 (as well as commons-net-20060901) exhibits this behavior.
> commons-net-1.3.0 works properly
> I did a little investigating, and it seems to happen with every file written to the remote
directory each hour, and the incorrect timestamp will be returned using listFiles for about
15 minutes... and then it corrects itself.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message