Android GMT Date Get millisToGMT(long millis)

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

Description

millis To GMT

License

Open Source License

Declaration

public static String millisToGMT(long millis) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Locale;
import java.util.TimeZone;

public class Main {
    /**// www.  ja v a2s . c om
     * 
     */
    public static String millisToGMT(long millis) {
        SimpleDateFormat df = new SimpleDateFormat("MM_dd_yyyy_hh_mm",
                Locale.getDefault());
        df.setTimeZone(TimeZone.getTimeZone("GMT"));
        return df.format(millis) + "_UTC";
    }
}

Related

  1. getGMTDate()
  2. getGMTDate(Date date)
  3. getGMTDateFromString(String dateStr)
  4. getMillisGMT()