title: How do I convert a Firestore date/Timestamp to Date in Kotlin?
body: <p>i'm working with firestore, and getting stuck when i get the timestamp from firestore. how i convert this <code>Timestamp(seconds=1556006384, nanoseconds=994000000)</code> to Date in kotlin.</p>
  
  <p>my minimum SDK is 21 so the  code below doesn't work</p>
  
  <pre><code>val timestamp = it["time"] as com.google.firebase.Timestamp
  val milliseconds = timestamp.seconds * 1000 + timestamp.nanoseconds / 1000000
  val tz = ZoneId.of("Asia/Jakarta (UTC+07:00)")
  val localDateTime = LocalDateTime.ofInstant(Instant.ofEpochMilli(milliseconds), tz)
  </code></pre>
  
  <p>thank you.</p>