I am coding an Android application, which should receive a java.time.LocalDateTime object through an HTTP REST API that I developed in the server side.
The problem is that Android is still in Java 7, and java.time is only available in Java 8.
Having that said, what is the best way to represent a variable that contains date and time in Android? I prefer not to use sql.timestamp.
Thank you!
You could use the ThreeTen Android Backport which is an Android adaption to the original ThreeTen-Backport that backports much of the new java.time
api back to Java SE 6 and SE 7.
See this answer to get started.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With