I have a field in Firestore which is of type "Timestamp". I am able to store the value in Firestore using either the java "Date" type or the java Firebase "Timestamp" types. The field is stored in Firebase successfully as the "Timestamp" type.
When I try to send the value back to the client from the server using GCM, I get the following error:
java.text.ParseException: Unparseable date: "[object Object]"
I have logged out the RemoteMessage.getData(), notice the "createdAt" field, this is the TimeStamp that is giving the parsing error.
{userId=someValue, id=someValue, iv=someValue, text=someValue, createdAt=[object Object]}
How can I handle the parsing of this Timestamp field?
FYI: here is the nodejs code that creates the GCM notification:
data: {
id: `${id}`,
userId: `${userId}`,
text: `${text}`,
createdAt: `${createdAt}`,
iv: `${iv}`
}