Here is my code which i am using to parse string using Instant.parse ,
String date = "2018-05-01T00:00:00";
Instant.parse(date)
And getting below error
java.time.format.DateTimeParseException: Text '2018-05-01T00:00:00' could not be parsed at index 19
at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:1949)
at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1851)
at java.time.Instant.parse(Instant.java:395)
I cannot use other then Instant so looking solution for it only!