2

how can i get the current date "day-time" in my document in firestore as i wanna display photos set orenter image description heredered by name . this way doesnt work

Kotlin

class Data( var urlList: MutableList<String>,var time: MutableMap<String, String>) {
    constructor() : this(ArrayList(),  ServerValue.TIMESTAMP)
}
Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441

1 Answers1

4

ServerValue.TIMESTAMP is only used with Realtime Database. You need FieldValue.serverTimestamp() instead for Firestore.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441