Java Timestamp Create getTimestamp()

Here you can find the source of getTimestamp()

Description

get Timestamp

License

Open Source License

Declaration

public static String getTimestamp() 

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 {
    private static final String ISO8601 = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'";

    public static String getTimestamp() {
        TimeZone timeZone = TimeZone.getTimeZone("UTC");
        DateFormat dateFormat = new SimpleDateFormat(ISO8601);
        dateFormat.setTimeZone(timeZone);
        return dateFormat.format(new Date());
    }/*from  ww  w  .  j  a  va 2s. c  o m*/
}

Related

  1. createTimestamp(int month, int day)
  2. createTimestampedZipFilename(String prefix)
  3. createTimestampFormat()
  4. createTimeStamps()
  5. getTimestamp()
  6. getTimestamp()
  7. getTimestamp()
  8. getTimeStamp()
  9. getTimestamp()