Java Long Number to Time ConvertLongToTimeString(long lastModified)

Here you can find the source of ConvertLongToTimeString(long lastModified)

Description

Convert Long To Time String

License

Open Source License

Declaration

public static String ConvertLongToTimeString(long lastModified) 

Method Source Code


//package com.java2s;
import java.text.SimpleDateFormat;
import java.util.Date;

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

public class Main {
    public static String ConvertLongToTimeString(long lastModified) {
        return toISO2616DateFormat(new Date(lastModified));
    }/*from w  w  w. ja  v a  2 s .co  m*/

    public static String toISO2616DateFormat(Date date) {
        SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US);
        dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
        return dateFormat.format(date);
    }
}

Related

  1. convertLong2String(Long time, String format)
  2. convertLongDate(long lDate, String format)
  3. convertLongTimeStampToString(long localTimeStamp)
  4. convertLongTimeToText(Long time)
  5. convertLongToTimestampString(String dateFormat, Long millSec)
  6. convertMillisToHHMMSS(long millis)
  7. convertMillsToDateString(long currentTimeMillis)
  8. convertTime(long difference)
  9. convertTime(long time)