Here you can find the source of parseDate(String gmtTimeString)
Parameter | Description |
---|---|
gmtTimeString | - |
public static Date parseDate(String gmtTimeString)
//package com.java2s; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { /**//from w w w .j a v a 2 s .co m * @param gmtTimeString * - * @return - */ public static Date parseDate(String gmtTimeString) { try { DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); df.setTimeZone(java.util.TimeZone.getTimeZone("GMT")); Date date = df.parse(gmtTimeString); return date; } catch (ParseException e) { throw new RuntimeException("convrt to runtime exception", e); } } }