Java Time to String timeToStr(int time)

Here you can find the source of timeToStr(int time)

Description

time To Str

License

Apache License

Declaration

public static String timeToStr(int time) 

Method Source Code


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

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

public class Main {
    private static final String STAND_DATE_TIME = "yyyy-MM-dd HH:mm:ss";

    public static String timeToStr(int time) {
        return new SimpleDateFormat(STAND_DATE_TIME).format(new Date(time * 1000L));
    }/*from   w w  w.  jav  a 2 s .  co m*/
}

Related

  1. timeString(long tickNo, long offset)
  2. timeString2Date(String time)
  3. timeToDeparture(String startTime)
  4. timeToFullString(long time)
  5. timeToFullString(long time, boolean longNames)
  6. timeToStr(String time)
  7. timeToString(Calendar date)
  8. timeToString(Date d, String tzString)
  9. timeToString(Date date)