commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julien Aymé (JIRA) <>
Subject [jira] Commented: (NET-159) FTPFile.getTimestamp() is off by one year
Date Wed, 06 Jun 2007 15:08:26 GMT


Julien Aymé commented on NET-159:

Hi Rory,

1. I may miss something on how a FTP server works, but it seems to me that the date returned
in the file entries are always given from the GMT timezone. If so, the best way to correct
it would be to compare the date given to the current date in the GMT timezone:

Instead of setting the Calendar timezone to the server timezone, I think we should set the
Calendar timezone to GMT.
(in FTPTimestampParserImpl#parseTimestamp(String)).

2. I think the rollback behaviour should be disabled only if the date given is not more than
one day ahead of the current date (since any timezone difference would be less than 24hours),
and let the dates which are more than one day ahead be rolled back. By doing so, the date
given by getTimestamp would be far more reliable:
Indeed, if I disable the Rollback behaviour, on the 1st January of any year, all my files
would have their timestamps in the future :-)


> FTPFile.getTimestamp() is off by one year
> -----------------------------------------
>                 Key: NET-159
>                 URL:
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 1.4
>         Environment: winxp, jdk 1.5
>            Reporter: dangerOp
>            Priority: Minor
>             Fix For: 2.0
> The Calendar object returned by FTPFile.getTimestamp seems to be short by one year.

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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message