Java Instant Format formatHttpDate(Instant instant)

Here you can find the source of formatHttpDate(Instant instant)

Description

format Http Date

License

Apache License

Declaration

public static String formatHttpDate(Instant instant) 

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 {
    public static String formatHttpDate(Instant instant) {
        // TODO java 7 incompatible
        return DateTimeFormatter.RFC_1123_DATE_TIME.format(instant.atOffset(ZoneOffset.UTC));
    }//w  w  w.  java  2  s .com
}

Related

  1. format(Instant _instant, String _format)
  2. format(Instant instant)
  3. formatAtSAST(Instant instant, DateTimeFormatter format)
  4. formatDate(Instant date, Locale locale)
  5. formatDateForInstant(Instant instant)
  6. formatInstant(TemporalAccessor instant)
  7. formatIso8601Date(Instant date)
  8. formatTimeLocal(Instant instant)
  9. parseInstant(String dateString, DateTimeFormatter formatter)