title: Parsing and formatting LocalDate with unnecessary time and timezone
body: <p><strong>Edit :</strong></p>
  
  <p>I opened a bug and it has been confirmed by Oracle. You can follow the resolution here : <a href="https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8216414" rel="nofollow noreferrer">https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8216414</a></p>
  
  <hr>
  
  <p>I'm interfacing with a LDAP repository which store the birthdate of a person with the time and timezone like this :</p>
  
  <ul>
  <li>If the birthdate is "27-12-2018", then the LDAP string is "20181227000000+0000".</li>
  </ul>
  
  <p>I cannot find a way to parse AND format the birthdate <strong>using the same pattern</strong>.</p>
  
  <p>The following code works well for formatting but not for parsing :</p>
  
  <pre><code>LocalDate date = LocalDate.of(2018, 12, 27);
  String pattern = "yyyyMMdd'000000+0000'";
  DateTimeFormatter birthdateFormat = DateTimeFormatter.ofPattern(pattern);
  
  // Outputs correctly 20181227000000+0000
  date.format(birthdateFormat);
  
  // Throw a DatetimeParseException at index 0
  date = LocalDate.parse("20181227000000+0000", birthdateFormat);
  </code></pre>
  
  <p>And the following code works well for parsing but not for formatting</p>
  
  <pre><code>LocalDate date = LocalDate.of(2018, 12, 27);
  String pattern = "yyyyMMddkkmmssxx";
  DateTimeFormatter birthdateFormat = DateTimeFormatter.ofPattern(pattern);
  
  // Throws a UnsupportedTemporalTypeException for ClockHourOfDay not supported
  // Anyway I would have an unwanted string with non zero hour, minute, second, timezone
  date.format(birthdateFormat);
  
  // Parse correctly the date to 27-12-2018
  date = LocalDate.parse("20181227000000+0000", birthdateFormat);
  </code></pre>
  
  <p>Which pattern could satisfy both parsing and formating ?</p>
  
  <p>Am I forced to use 2 different patterns ?</p>
  
  <p>I am asking because the pattern is configured in a property file. I want to configure 1 pattern only in this property file. I would like to externalize the pattern because the LDAP is not part of my project, it is a shared resource and I have no guarantee that the format cannot change.</p>