Time Actually Rewinds 343 Seconds in Java: Understanding Historical Timezone Data Quirks

Look at this Java code: public class MainTest { public static void main(String[] args) throws Exception { SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date = simpleDateFormat.parse("1900-01-01 08:00:00"); System.out.println(simpleDateFormat.format(date)); ...

Posted on Tue, 25 Aug 2026 16:17:42 +0000 by fabiuz

Working with Date and Time in Java

Java provides multiple APIs for handling date and time, evolving significantly over versions to address design flaws and usability issues. Legacy java.util.Date The java.util.Date class represents a specific instant in time with millisecond precision. Despite its name, it encapsulates both date and time. Date now = new Date(); // Current timest ...

Posted on Mon, 11 May 2026 11:01:12 +0000 by ahoo