Here you can find the source of parseInstant(String dateString, DateTimeFormatter formatter)
private static Instant parseInstant(String dateString, DateTimeFormatter formatter)
//package com.java2s; //License from project: Apache License import java.time.Instant; import java.time.ZoneOffset; import java.time.format.DateTimeFormatter; public class Main { private static Instant parseInstant(String dateString, DateTimeFormatter formatter) { return formatter.withZone(ZoneOffset.UTC).parse(dateString, Instant::from); }/*from w w w . j a v a 2s.c om*/ }