Here you can find the source of deserializeToInstant(String date)
public static Instant deserializeToInstant(String date)
//package com.java2s; //License from project: Apache License import java.time.Instant; import java.time.LocalDateTime; import java.time.ZoneId; import java.time.ZoneOffset; import java.time.format.DateTimeFormatter; public class Main { private static final DateTimeFormatter ISO_FORMAT = DateTimeFormatter.ISO_LOCAL_DATE_TIME; public static final ZoneId UTC = ZoneId.of("UTC"); public static Instant deserializeToInstant(String date) { return deserialize(date).toInstant(ZoneOffset.UTC); }/*from w w w . ja va 2 s . com*/ public static LocalDateTime deserialize(String date) { return LocalDateTime.parse(date, ISO_FORMAT); } }