Java Date UTC Format formatUtcTime(long tval)

Here you can find the source of formatUtcTime(long tval)

Description

format Utc Time

License

Open Source License

Declaration

public static String formatUtcTime(long tval) 

Method Source Code

//package com.java2s;
// The MIT License

import java.text.SimpleDateFormat;

import java.util.SimpleTimeZone;

public class Main {
    public static String formatUtcTime(long tval) {
        SimpleDateFormat utcSdf = new SimpleDateFormat(
                "yyyy-MM-dd'T'HH:mm:ss");
        utcSdf.setTimeZone(new SimpleTimeZone(0, "UTC"));
        String stg = utcSdf.format(tval);
        return stg;
    }// w  w  w .  ja v  a  2s .c  o  m
}

Related

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