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

[lang] DateUtils constants should be long

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.1
    • None
    • None
    • Operating System: other
      Platform: Other

    • 25627

    Description

      The fields
      MILLIS_IN_SECOND ,MILLIS_IN_MINUTE ,MILLIS_IN_HOUR,MILLIS_IN_DAY
      should be of type long so that if you have an expression:
      System.out.println(new Date(30 * 365 * DateUtils.MILLIS_IN_DAY));
      it doesn't print out as
      Wed Jan 14 18:46:34 GMT 1970
      due to overflow of integer!

      Attachments

        Activity

          People

            Unassigned Unassigned
            n.metchev@teamphone.com Nikolay Metchev
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: