What is the algorithm represented in Java to convert an 12 hour am/pm meridiem format hour to 24 hour format?

I needed to convert only the hour part of 12 hour time string to 24 hour format. I’m not interested in other than hour parts of a date string. SimpleDateFormatter is notoriously buggy and I in fact I’…

converting epoch to ZonedDateTime in Java

How to convert epoch like 1413225446.92000 to ZonedDateTime in java? The code given expects long value hence this will throw NumberFormatException for the value given above. ZonedDateTime.ofInstant(…