Holen Sie sich die aktuelle Zeit in Kotlin
// declaration
var c : Calendar = Calendar.getInstance()
private var df : SimpleDateFormat? = null
private var formattedDate = ""
// goes to main method or onCreate(Android)
df = SimpleDateFormat("dd-MM-yyyy HH:mm a")
formattedDate = df!!.format(c.time)
println("Format dateTime => $formattedDate")
Dizzy Dunlin