It may sound very funny and basic, but I am struggling with creating a DateTime kind of object in Kotlin by passing the number of seconds from epoch to it.
Either the examples that I am getting are of the libraries that require API level 26, or just talk about format conversion from string of DD-MM-YYYY to some other.
I have tried "LocalDateTime", "Timestamp", "Date" so far, but Kotlin either refuses to recognise them or the doesn't agree to the function parameters, or is unable to resolve namespace conflict. Or the examples are of Java, which don't work in Kotlin or don't have equivalent in Kotlin.
With Date() I am getting error "Cannot access '': It is private in Date()"
With LocalDate, LocalDateTime, I am getting the API level error
With Timestamp I am getting error "None of the following functions can be called with the arguments supplied". I am passing Long as the parameter as mentioned in documentation. But it is expecting "Parcel" or "Date".
Could someone please help?