Java Instant Format parseInstant(String dateString, DateTimeFormatter formatter)

Here you can find the source of parseInstant(String dateString, DateTimeFormatter formatter)

Description

parse Instant

License

Apache License

Declaration

private static Instant parseInstant(String dateString, DateTimeFormatter formatter) 

Method Source Code


//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*/
}

Related

  1. formatDateForInstant(Instant instant)
  2. formatHttpDate(Instant instant)
  3. formatInstant(TemporalAccessor instant)
  4. formatIso8601Date(Instant date)
  5. formatTimeLocal(Instant instant)
  6. toInfluxDBTimeFormat(final Instant time)