background
Date and time before Java8 generally use Calendar and Date. After Java8, I started to use LocalDate, LocalDateTime, and Instant. When I learned the new features of Java8, I also wrote demos, and then don’t forget them after a while...
Record the usage in the actual scene here.
TBC......
reference
Calculate date and time difference in Java8
LocalDateTime calculates the time difference
Conversion between Date and LocalDateTime, LocalDate, and LocalTime in Java 8
Java8 date processing practice
Conversion between LocalDateTime and timestamp in Java8
Conversion between Date and LocalDateTime, LocalDate, and LocalTime in Java 8