Java Date UTC Format getStrTimeByUTC(long utc, String format)

Here you can find the source of getStrTimeByUTC(long utc, String format)

Description

get Str Time By UTC

License

Apache License

Declaration

public static String getStrTimeByUTC(long utc, String format) 

Method Source Code

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

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {

    public static String getStrTimeByUTC(long utc, String format) {
        return new SimpleDateFormat(format).format(new Date(utc));
    }/* w w  w  .  ja  va 2  s.c  o  m*/
}

Related

  1. formatDate(Date date, String pattern, boolean toUTC)
  2. formatTimeStamp(byte[] btValue, int iOffset, int iLength, int iUtcOffset)
  3. formatUTC(Date date, String format)
  4. formatUtcDateIfNotNull(final Date date)
  5. formatUtcTime(long tval)
  6. getUTCDateFormat()
  7. getUTCFormat()
  8. parseCcsdsUtcFormat(String timeString)
  9. toUTCDateFormat(Date date)