Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-1268

FixedDateFormat is incorrect for formats having MMM with the French locale

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6
    • Component/s: Core
    • Labels:
      None
    • Environment:

      French Windows 10, Java 8

      Description

      While verifying LOG4J2-920 I came across the following tests failures in Core:
      FixedDateFormatTest.testFormatLong:147 DATE/1455054137029 expected:<09 févr. 201[6 ]22:42:17,029> but was:<09 févr. 201[]22:42:17,029>
      FixedDateFormatTest.testFormatLongCharArrayInt:181 DATE/1455054136333 expected:<09 févr. 201[6 ]22:42:16,333> but was:<09 févr. 201[]22:42:16,333>
      FixedDateFormatTest.testFormatLongCharArrayInt_goingBackInTime:199 DATE/1455234136907 expected:<12 févr. 201[6 ]00:42:16,907> but was:<12 févr. 201[]00:42:16,907>
      FixedDateFormatTest.testFormatLong_goingBackInTime:163 DATE/1455234136722 expected:<12 févr. 201[6 ]00:42:16,722> but was:<12 févr. 201[]00:42:16,722>

      Looking at the code the implementation of FixedDateFormat/FixedFormat expect the size of the pattern MMM (for shot months) to be 3 characters, which in French at least isn't the case.

        Attachments

          Activity

            People

            • Assignee:
              remkop@yahoo.com Remko Popma
              Reporter:
              lhochet Ludovic HOCHET
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: