Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8311987

Date Parsing failing for pattern MM/dd/yyyy a h:mm z when Locale is set to CLDR in JDK 8

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 8
    • core-libs

      SimpleDateFormat parse method is failing with java.text.ParseException: Unparseable date exception when the pattern MM/dd/yyyy a h:mm:ss z is used and the locale provider is set to CLDR .
      The timezone is set to UTC and locale is set to 'English'.
      Reporoducer (Main.java) is attached.

      Steps to reprodcuce.

      1. Compile Main.java.
      2. {JAVA_HOME}/java -Djava.locale.providers=CLDR -showversion Main

      The test passes if we use the default provider of jdk8 (JRE provider) or if we explicitly se it as argument {JAVA_HOME}/java -Djava.locale.providers=JRE -showversion Main

            jjose Johny Jose
            jjose Johny Jose
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: