I am trying to create a firebase firestore timestamp object by passing number of seconds to it, but it is not working.
Here's the code snippet.
import com.google.firebase.Timestamp
import com.google.firebase.firestore.*
var timeStampString:String = "1438910477"
var t = timeStampString.toLong()
var ts = Timestamp(t)
I am getting error:
None of the following functions can be called with the arguments supplied
<Init>(Parcel) defined in com.google.firebase.Timestamp
<Init>(Date) defined in com.google.firebase.Timestamp
I am passing number as the parameter as mentioned in documentation. But it is expecting "Parcel" or "Date".
What am I doing wrong?