Here you can find the source of parseDate(DateFormat df, String dateStr)
protected static Date parseDate(DateFormat df, String dateStr)
//package com.java2s; //License from project: Open Source License import java.text.DateFormat; import java.util.*; public class Main { private static final TimeZone ET = TimeZone.getTimeZone("US/Eastern"); /**/* w w w . j a v a 2 s. c om*/ * parse date as ET or UTC */ protected static Date parseDate(DateFormat df, String dateStr) { Date date = null; if (dateStr != null && dateStr.length() > 0) { try { if (dateStr.contains("UTC")) { date = df.parse(dateStr); } else if (dateStr.contains("ET")) { // parse as winter time date = df.parse(dateStr.replace("ET", "EST")); // EDT - summer, EST - winter // daylight savings is summer time if (ET.inDaylightTime(date)) { // reparse as summer time date = df.parse(dateStr.replace("ET", "EDT")); } } } catch (Exception e) { throw new RuntimeException(e); } //System.out.println("date " + dateStr + " -> " + date); } return date; } }