I am getting an exception when parsing date 20160327020727
with format yyyyMMddhhmmss
. Note that the lenient is set to false.
SimpleDateFormat df = new SimpleDateFormat("yyyyMMddhhmmss");
df.setLenient(false);
try {
Date dt = df.parse("20160327020727");
} catch (ParseException e) {
e.printStackTrace();
}
It is parsing other dates with the same format and it is working as expected. Why is this happening?
CET changes to summer time the last Sunday of march, so there is no 2AM this day.
You go from 1:59 to 3:00
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With