I need to convert a unix timestamp to a date object. I tried this:
java.util.Date time = new java.util.Date(timeStamp);
Timestamp value
For kotlin
fun unixToDate(timeStamp: Long) : String? { val time = java.util.Date(timeStamp as Long * 1000) val sdf = SimpleDateFormat("yyyy-MM-dd") return sdf.format(time) }