Here you can find the source of formatISOUTCDateTime(long timestamp)
public static String formatISOUTCDateTime(long timestamp)
//package com.java2s; //License from project: Open Source License import java.time.Instant; import java.time.ZoneOffset; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; public class Main { public static String formatISOUTCDateTime(long timestamp) { ZonedDateTime zonedDateTime = ZonedDateTime.ofInstant( Instant.ofEpochMilli(timestamp), ZoneOffset.UTC); DateTimeFormatter formatter = DateTimeFormatter.ISO_DATE_TIME; return formatter.format(zonedDateTime); }//from w ww . j a v a 2 s . c o m }