DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35181>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35181


[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[EMAIL PROTECTED]




------- Additional Comments From [EMAIL PROTECTED]  2005-06-04 02:28 -------
On further review -- you're right - or mostly so!

I checked a few popular FTP servers (including several Apache mirrors) and all
seem to follow your pattern.  They show the year after six months.

Then I looked back at earlier versions of our code.

Prior to the introduction of
org.apache.commons.net.ftp.parser.FTPTimestampParserImpl, the default
implementation simply compared months.  If the month on the timestamp was
greater than the current month, it must be last year.  That was the test.  It
eliminates most "slop".  I suppose it might fail when the current time is Jan 31
23:59:59 and file timestamp is Feb 1 00:00, but it basically gave the right
results except in these edge cases.

The new code "improved" things by delegating to java.util.Date's "simple"
after() method but made matters worse in the "slop" case.

Your suggestion probably works best of all, but I'm still a little bothered by
the six month thing.  Suppose there is an FTP server that displays the time for
all files less than a year old - which is what the old code, written by Daniel
Savarese, seems to imply.  Then your code breaks there.

Perhaps Daniel might like to chime in on how he remembers this?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to