Java Millisecond Format formatMillisTimeGMT(long millis)

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

Description

format Millis Time GMT

License

Open Source License

Declaration

public static String formatMillisTimeGMT(long millis) 

Method Source Code


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

import java.text.DateFormat;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    private static DateFormat GMT_FORMAT_MILLIS = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");

    public static String formatMillisTimeGMT(long millis) {
        Date d = new Date(millis);
        synchronized (GMT_FORMAT_MILLIS) {
            return GMT_FORMAT_MILLIS.format(d);
        }//from  w w  w.j a va  2s  . c om
    }
}

Related

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