Switch from java.util.Date to java.time.Instant? #904
-
Is there any plan to switch from the deprecated java.util.Date to the more modern java.time.Instant? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Most definitely, but as that forces a >= JDK 8 dependency, we were waiting for 1.0 compliance with the RFCs before doing so. The only thing remaining is for JJWT to be able to parse full JSON JWS and JWE documents (i.e. non-compact JWT). Once that's done, we were going to release a final 0.x version (for JDK 7) and 1.0+ for JDK 8 and later. Maybe even JDK 11, 15, or 17 as the baseline - we haven't decided yet. |
Beta Was this translation helpful? Give feedback.
-
As of my last knowledge update in January 2022, Java has already deprecated java.util.Date and related classes in favor of the more modern and comprehensive java.time API introduced in Java 8. Therefore, in the short term, it is recommended to switch from java.util.Date to java.time.Instant and other java.time classes for better date and time handling. |
Beta Was this translation helpful? Give feedback.
Most definitely, but as that forces a >= JDK 8 dependency, we were waiting for 1.0 compliance with the RFCs before doing so. The only thing remaining is for JJWT to be able to parse full JSON JWS and JWE documents (i.e. non-compact JWT). Once that's done, we were going to release a final 0.x version (for JDK 7) and 1.0+ for JDK 8 and later. Maybe even JDK 11, 15, or 17 as the baseline - we haven't decided yet.