How to get current timestamp in Android on Kotlin?
Hello everyone! I'm a beginner Android developer writing in Kotlin. I've encountered what seems like a simple task: I need to get the current timestamp in my app, for example, to save the creation time of a record to a database or send it to a server.
I've tried several options but got confused with different APIs. Previously in Java I used `System.currentTimeMillis()`, but in Kotlin it also works and I get some long number. Is this correct? But I've heard that it's not very good and I should use `Instant.now()` or `Calendar.getInstance()`. Also there's `Date()`.
Please advise which method is considered correct and modern for Android (API 26+)? I need to get the timestamp in Unix format (milliseconds since January 1, 1970). Here's an example of m