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

DateUtilsTest.testLang530 fails for some timezones

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.4
    • 3.5
    • lang.time.*
    • None
    • Redhat 5 / Java8u45

    Description

      Unit test for testLang530 fails when the isoDateStr comes out with just a Z instead of +00:00.

      Tests run: 38, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.014 sec <<< FAILURE! - in org.apache.commons.lang3.time.DateUtilsTest
      testLang530(org.apache.commons.lang3.time.DateUtilsTest)  Time elapsed: 0.005 sec  <<< ERROR!
      java.text.ParseException: Unable to parse the date: 2015-04-17T18:51:52Z
              at org.apache.commons.lang3.time.DateUtils.parseDateWithLeniency(DateUtils.java:401)
              at org.apache.commons.lang3.time.DateUtils.parseDate(DateUtils.java:301)
              at org.apache.commons.lang3.time.DateUtils.parseDate(DateUtils.java:278)
              at org.apache.commons.lang3.time.DateUtilsTest.testLang530(DateUtilsTest.java:1222)
      

      On a Linux machine where this test passes, isoDateStr is 2015-04-17T19:26:03+00:00.

      Attachments

        1. lang-1116.patch
          2 kB
          Aaron Sheldon
        2. lang-1116.patch
          2 kB
          Aaron Sheldon

        Activity

          People

            chonton Charles Honton
            asheldon Aaron Sheldon
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: