Java Instant Format formatAtSAST(Instant instant, DateTimeFormatter format)

Here you can find the source of formatAtSAST(Instant instant, DateTimeFormatter format)

Description

format At SAST

License

Open Source License

Declaration

public static String formatAtSAST(Instant instant, DateTimeFormatter format) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.time.*;
import java.time.format.DateTimeFormatter;

public class Main {
    private static final ZoneId zoneSAST = ZoneId.of("Africa/Johannesburg");

    public static String formatAtSAST(Instant instant, DateTimeFormatter format) {
        return instant.atZone(zoneSAST).format(format);
    }/*from   w ww  .j a v  a2s .c o  m*/
}

Related

  1. format(Instant _instant, String _format)
  2. format(Instant instant)
  3. formatDate(Instant date, Locale locale)
  4. formatDateForInstant(Instant instant)
  5. formatHttpDate(Instant instant)
  6. formatInstant(TemporalAccessor instant)