Here's my code:
private final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MMM dd HH:mm:ss");
LocalDateTime timeStamp = LocalDateTime.parse(string, formatter);
Which results in the follwoing exception:
java.time.format.DateTimeParseException: Text 'Oct 10 13:10:01' could not be parsed: Unable to obtain LocalDateTime from TemporalAccessor: {MonthOfYear=10, DayOfMonth=10},ISO resolved to 13:10:01 of type java.time.format.Parsed
Using Java 1.8.0_31.
I did look around and found many similar issues but non of them matches this one exatcly and solutions offered there are not applicable here:
Here the reason for the same issue was using LocalDateTime without the Time parts. As you can see from the expection this is not the case here.
I'm not using week-based year as in this example.
And finally unlike here I'm using LocalDateTime so timezones should not be a problem. But as it's supposedly a bug in DateTimeFormatter I've tried to pass the formatter as 'formatter.withZone(ZoneId.systemDefault())' (suggested workaround) which resulted in the same exception.