Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-446

Inconsistent short date handling

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • 3.1
    • None
    • FTP
    • None

    Description

      Most FTP servers seem to use short dates when the file date is within +/- 6 months of the server clock.
      Some may use a different strategy, for example +0 / -12 months.
      The code currently (3.2 SNAPSHOT - r1295237) assumes short dates are always in the past, unless "lenient future date" is selected, in which case a day's grace is allowed, i.e. +1 day / -364 days.

      However, when dealing with Feb 29th, the code does not handle the case where the server clock is in the following year.

      Since most FTP servers use +/- 6 months for short dates, this is not generally a problem.

      Equally, the code does not deal with future dates more than a day in advance, since that is usally all that is needed for handling different time zones. (Is it likely that an FTP server has genuine future-dated files?)

      See https://issues.apache.org/jira/browse/NET-188#comment-12579253 for a suggested API to specify short-date ranges.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: