Here you can find the source of format(Instant instant)
public static String format(Instant instant)
//package com.java2s; //License from project: Open Source License import java.time.Instant; import java.time.ZoneId; import java.time.format.DateTimeFormatter; public class Main { private static DateTimeFormatter outputDateFormat = DateTimeFormatter.ofPattern("uuuu-MM-dd") .withZone(ZoneId.of("UTC")); public static String format(Instant instant) { return outputDateFormat.format(instant); }/* w ww . j a v a 2 s . c om*/ }