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

DateUtils.parseDate backward Incompatibility bug

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.5, 3.6, 3.7, 3.8, 3.9, 3.8.1
    • None
    • lang.time.*
    • System: Linux testinglab 4.4.0-131-generic #157~14.04.1-Ubuntu

      Java version "1.8.0_191"
      Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
      Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)

       

       

    • Important

    Description

      Hi,

      The following code snippets throw a ParseException when trying to parse the time. It works well before commons-lang 3.4. When I update commons-lang to 3.5 or newer versions, it failed.

      	@Test
      	public void Demo() throws ParseException {
      		assertEquals("Tue Jun 11 15:06:11 CDT 2019", DateUtils.parseDate("2019-06-11T15:06:11.716-0500", "yyyy-MM-dd'T'HH:mm:ss.SSSZZ"));
      		
      	}
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lingchao xia0c
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m