Here you can find the source of getGMTDateFormat(String strFormat)
public static SimpleDateFormat getGMTDateFormat(String strFormat)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.SimpleTimeZone; public class Main { public static SimpleDateFormat getGMTDateFormat(String strFormat) { SimpleDateFormat format = new SimpleDateFormat(strFormat); format.setCalendar(getGMTCalendar()); return format; }/*from w w w . j av a2s . co m*/ public static Calendar getGMTCalendar() { return Calendar.getInstance(new SimpleTimeZone(0, "GMT")); } }