returns: Sun Mar 08 03:38:13 PDT 2009. Actually, if I change the date&time to "2009-03-08 03:38:13", it returns the same thing!
Here is the code:
public static void main(String[] args) {
SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_TIME_FORMAT);
//dateFormat.setLenient(false);
try {
System.out.println("date is "+dateFormat.parse("2009-03-08 03:38:13"));
System.out.println("date is "+dateFormat.parse("2009-03-08 02:38:13"));
} catch (ParseException e) { e.printStackTrace(); }
}
If dateFormat.setLenient(false) is uncommented out, it throws a ParseException.
What a weird problem. Does anybody have any ideas?