Java Time in GMT getGMTDateFormat(String strFormat)

Here you can find the source of getGMTDateFormat(String strFormat)

Description

get GMT Date Format

License

Apache License

Declaration

public static SimpleDateFormat getGMTDateFormat(String strFormat) 

Method Source Code


//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"));
    }
}

Related

  1. getGMT8Time()
  2. getGMTByDisplay(String tm)
  3. getGMTCalendarAtTime(String sTime)
  4. getGMTDate()
  5. getGMTDateFormat(String format)
  6. getGMTDateString(Date date)
  7. getGMTDatetime(Date datetime)
  8. getGMTDatetimeFormat()
  9. getGmtFromTimeInMillis(String val)