title: Unable to obtain ZonedDateTime from TemporalAccessor using DateTimeFormatter and ZonedDateTime in Java 8
body: <p>I recently moved to Java 8 to, hopefully, deal with local and zoned times more easily.</p>
  <p>However, I'm facing an, in my opinion, simple problem when parsing a simple date.</p>
  <pre><code>public static ZonedDateTime convertirAFecha(String fecha) throws Exception {
      DateTimeFormatter formatter = DateTimeFormatter.ofPattern(
              ConstantesFechas.FORMATO_DIA).withZone(
              obtenerZonaHorariaServidor());
  
      ZonedDateTime resultado = ZonedDateTime.parse(fecha, formatter);
      return resultado;
  }
  </code></pre>
  <p>In my case:</p>
  <ul>
  <li>fecha is '15/06/2014'</li>
  <li>ConstantesFechas.FORMATO_DIA is 'dd/MM/yyyy'</li>
  <li>obtenerZonaHorariaServidor returns ZoneId.systemDefault()</li>
  </ul>
  <p>So, this is a simple example. However, the parse throws this exception:</p>
  <blockquote>
  <p>java.time.format.DateTimeParseException: Text '15/06/2014' could not
  be parsed: Unable to obtain ZonedDateTime from TemporalAccessor:
  {},ISO resolved to 2014-06-15 of type java.time.format.Parsed</p>
  </blockquote>
  <p>Any tips? I've been trying different combinations of parsing and using TemporalAccesor, but without any luck so far.</p>