[ 
https://issues.apache.org/jira/browse/NET-159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501952
 ] 

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 :-)

Julien


> FTPFile.getTimestamp() is off by one year
> -----------------------------------------
>
>                 Key: NET-159
>                 URL: https://issues.apache.org/jira/browse/NET-159
>             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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to