Here you can find the source of getGMTDateString(Date date)
public static String getGMTDateString(Date date)
//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 getGMTDateString(Date date) { SimpleDateFormat formatter = (SimpleDateFormat) DateFormat.getDateInstance(); TimeZone gmt = TimeZone.getTimeZone("GMT"); formatter.setTimeZone(gmt);/*from www . j a va 2 s . com*/ formatter.applyPattern("dd MMMM"); String dayString = formatter.format(date); formatter = (SimpleDateFormat) DateFormat.getTimeInstance(); formatter.setTimeZone(gmt); formatter.applyPattern("hh:mm zzz yyyy"); String timeString = formatter.format(date); return dayString + " at " + timeString; } }