I recently had to tell a co-worker not to use SimpleDateFormat in completely new code. If it was marked deprecated I guess this would not have been needed.
Instant and LocalDateTime are very different in behavior. I use LocalDateTime a lot in my applications because I need date and times without timezones (they are resolved dynamically later by another module).
Instant is an absolute point in time with very few meaning by itself. You shouldn't use it to store local date times; that would be a dirty trick.
Programmers should just learn when and how to use both.
95
u/frzme May 10 '22
I recently had to tell a co-worker not to use SimpleDateFormat in completely new code. If it was marked deprecated I guess this would not have been needed.