Home>

1. I was angry when trying to introduce ZonedDateTime at API level 21 to handle dates on Android.
After a quick check, it seems that Date and Calendar can be used.
2. If i have a version that is easier to handle, I would like to know its API level and library.
3. In addition, I would like to know the appropriate API level for creating an application from the viewpoint of sharing and library enhancement.

Error message

1. Although it is nice to see the share by version of Android and make it with API21, if you try to use ZonedDateTime, it seems that you will be using API26 or higher, and the target is quite narrowed down.
2.Omitted
3. If i think that the above problem might hit you again, I don't know if it's okay at the current API level.

Call requires API level 26 (current min is 21): java.time.ZonedDateTime # now
Applicable source code
ZonedDateTime doneTime = ZonedDateTime.now ()
Tried

I thought about implementing the ZonedDateTime class itself in the app, but I was worried about the cost and copyright of the implementation, so I decided to ask the question first.

Supplemental information (FW/tool version etc.)

Please provide more detailed information here.