Here you can find the source of format(Date timestamp)
Parameter | Description |
---|---|
timestamp | a parameter |
public static String format(Date timestamp)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; public class Main { private final static String zuluFormat = "yyyy-MM-dd'T'HH:mm:ss'Z'"; /**/*from w ww. j ava 2s. c o m*/ * Formats the given timestamp according OGC standard * * @param timestamp * @return */ public static String format(Date timestamp) { SimpleDateFormat formatter = new SimpleDateFormat(zuluFormat); formatter.setTimeZone(TimeZone.getTimeZone("GMT")); return formatter.format(timestamp); } }