Help: Cannot parse time: "2:00 PM CST"
Hi, i'm using SimpleDateFormat to parse time but got Exception:new SimpleDateFormat("h:mm a z").parse("2:00 PM CST");gotjava.text.ParseException: Unparseable date: "2:00 PM CST"can anyone telll me there is anything wrong with "h:mm a z"?thx!
[284 byte] By [
asklxfa] at [2007-10-2 17:51:09]

I don't see any parse exception when I use:try {
Date d = new SimpleDateFormat("h:mm a z").parse("2:00 PM CST");
System.out.println(d);
} catch(ParseException pe) {
pe.printStackTrace();
}
It outputsFri Jan 02 08:00:00 NZST 1970Perhaps you should post a small compilable example that
produces the exception you are getting.
i found the point:new SimpleDateFormat("h:mm a z", Locale.US)my operating system is simplified chinese, and the default locale is not US.thank you all the same!