Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-984

DurationFormatUtils does not handle large durations correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.3.1
    • lang.time.*
    • None

    Description

      DurationFormatUtils assumes that the the number of days, hours, minutes, seconds and milliseconds can be expressed as an int when converted from a long duration in milliseconds.

      However even the number of days can exceed an int if the duration is large enough.

      It's unlikely that such large durations will often be used, but this restriction is not documented. It should be easy enough to use long fields instead of int.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: