Here you can find the source of parseUTCFormattedDateString(String dateString)
public static Date parseUTCFormattedDateString(String dateString)
import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.Locale; import java.util.TimeZone; import android.util.Log; public class Main{ public static Date parseUTCFormattedDateString(String dateString) { SimpleDateFormat formatter = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm'Z'"); Date date = null;/*from w ww . ja va 2s .co m*/ try { date = formatter.parse(dateString); } catch (ParseException e) { Log.e(DateTimeUtil.class.getSimpleName(), "Failed to parse date"); e.printStackTrace(); } return date; } }