Java Unix Date getDispTimeByUnixTime(long unixSec)

Here you can find the source of getDispTimeByUnixTime(long unixSec)

Description

get Disp Time By Unix Time

License

LGPL

Declaration

public static String getDispTimeByUnixTime(long unixSec) 

Method Source Code


//package com.java2s;
//License from project: LGPL 

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {

    public static String getDispTimeByUnixTime(long unixSec) {
        SimpleDateFormat sdf = new SimpleDateFormat("yy/MM/dd HH:mm:ss");
        return sdf.format(new Date(unixSec * 1000));
    }/*w  w w  .ja v a 2 s .  co  m*/
}

Related

  1. escapeUnixChar(String strToEscape)
  2. getUnixDate()
  3. getUnixDate(Date date)
  4. getUnixDate(long millis)
  5. getUnixDate(String s)