Java Millisecond Format formatSystemTime(long millis)

Here you can find the source of formatSystemTime(long millis)

Description

format System Time

License

Open Source License

Declaration

public static String formatSystemTime(long millis) 

Method Source Code


//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);
         */
    }
}

Related

  1. formatMilliSecondsHumanReadable(long x)
  2. formatMillisecondsToConventional(long duration, int unitCount)
  3. formatMillisecondsToConventional(long time)
  4. formatMillisTime(long millis)
  5. formatMillisTimeGMT(long millis)
  6. formattedMillis(long millis)
  7. formatTime(long currentTimeMillis)
  8. formatTime(long localCreationTimeMillis)
  9. formatTime(long millis)