Java UTC Date getUtcTimestamp()

Here you can find the source of getUtcTimestamp()

Description

get Utc Timestamp

License

Open Source License

Declaration

public static String getUtcTimestamp() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

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

public class Main {
    public static String getUtcTimestamp() {

        DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
        format.setTimeZone(TimeZone.getTimeZone("GMT"));
        return format.format(new Date());
    }//  ww w .j  a  v  a2  s . com
}

Related

  1. GetUTCdatetimeAsString()
  2. GetUtcNow()
  3. getUTCTime()
  4. getUTCTime()
  5. getUTCTime(final Date inDate)
  6. getUtcTimestamp()
  7. getUTCTimestamp(Date date)
  8. getUtcTimestampAsString(Date date)
  9. getUTCTimeString4Digits(Date date)