Here you can find the source of formatSystemTime(long millis)
public static String formatSystemTime(long millis)
//package com.java2s; //License from project: Open Source License import java.text.DateFormat; import java.util.Date; public class Main { public static String formatSystemTime(long millis) { Date date = new Date(millis); return DateFormat.getInstance().format(date); /*/* w ww . j av a 2 s .com*/ Instant time = Instant.ofEpochMilli(millis); LocalDateTime localDateTime = LocalDateTime.ofInstant(time, ZoneId.systemDefault()); return localDateTime.format(DateTimeFormatter.ISO_DATE_TIME); */ } }