Java Date GMT Format parseGMT(String gmtTime)

Here you can find the source of parseGMT(String gmtTime)

Description

parse GMT

License

Open Source License

Declaration

public static Date parseGMT(String gmtTime) throws ParseException 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;

public class Main {
    public static SimpleDateFormat GMT_FORMAT = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss 'GMT'", Locale.UK);

    public static Date parseGMT(String gmtTime) throws ParseException {
        GMT_FORMAT.setTimeZone(TimeZone.getTimeZone("GMT"));
        return GMT_FORMAT.parse(gmtTime);
    }/*  w  w  w.ja v  a  2s . c o m*/
}

Related

  1. getStringBaseGMT(Date date, String timezone)
  2. getThreadLocalGMTDateFormat(final String format)
  3. getTimeAndDateAtGMT()
  4. getTzToGmt(String dateStr, String dateFormat, String beforeTimeZone, String afterTimeZone)
  5. parseDate(String gmtTimeString)
  6. parseGMTDatetime(String str)
  7. parseGMTTime(Long time, String format)
  8. timeStampGMT(Date date)
  9. toGMTString(Date d)