title: Parse clock time in java 8
body: <p>I wonder is it possible to parse clock time hour:minute:second in Java 8?</p>
  
  <p>e.g.</p>
  
  <pre><code>final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm:ss");
  final String str = "12:22:10";
  final LocalDateTime dateTime = LocalDateTime.parse(str, formatter);
  </code></pre>
  
  <p>I tried but get this exception:</p>
  
  <pre><code>Exception in thread "main" java.time.format.DateTimeParseException: Text '12:22:10' could not be parsed: Unable to obtain LocalDateTime from TemporalAccessor: {},ISO resolved to 12:22:10 of type java.time.format.Parsed
  </code></pre>