Here you can find the source of ParseUTCDate(String str)
public static Date ParseUTCDate(String str)
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { public static Date ParseUTCDate(String str) { SimpleDateFormat formatter = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ssZ", Locale.CHINA); try {/*w w w .j a v a2 s . c o m*/ Date date = formatter.parse(str); return date; } catch (ParseException e) { try { SimpleDateFormat formatter2 = new SimpleDateFormat( "EEE, dd MMM yyyy HH:mm:ss Z", Locale.CHINA); Date date2 = formatter2.parse(str); return date2; } catch (ParseException ex) { return null; } } } }