Why does parsing \'23:00 PM\' with SimpleDateFormat(\"hh:mm aa\") return 11 a.m.?
Here are the formatting options specifed in the javadoc
H Hour in day (0-23)
k Hour in day (1-24)
K Hour in am/pm (0-11)
h Hour in am/pm (1-12)
Notice that "h" would be for hours 1-12. If you want to handle 1-24, try "k". for 0-23 try "H". But I would not expect valid results if you are putting in impossible data.