Here you can find the source of toGmtTimestampString(Timestamp timestamp)
public static String toGmtTimestampString(Timestamp timestamp)
//package com.java2s; //License from project: Apache License import java.sql.Timestamp; import java.text.DateFormat; import java.util.TimeZone; public class Main { public static String toGmtTimestampString(Timestamp timestamp) { DateFormat df = DateFormat.getDateTimeInstance(); df.setTimeZone(TimeZone.getTimeZone("GMT")); return df.format(timestamp); }/* ww w . ja va2s. com*/ }