Thomas
Thomas3mo ago

Firebase Time Format broken after update

// ISSUE IS SOLVED Hi guys, Buildship seems to have changed the date format to a number format. I posted a message in "feedback" - I hope someone can help me with an issue concerning a changed date format in Firebase database entries after an update at Buildship. Thanks. Here is my original message: https://discord.com/channels/853498675484819476/883975617987608576/1253113956021571756
Solution:
Hi @Thomas, try with this updated Firestore node, it should then work, we'll do more testing and will update the node in the explorer. Copy the content from the above file and paste it https://docs.buildship.com/features/copy-paste#paste-node.
Jump to solution
10 Replies
Thomas
Thomas3mo ago
This is my firebase database entries before and after the update of the firebase node.
No description
No description
Solution
Gaurav Chadha
Gaurav Chadha3mo ago
Hi @Thomas, try with this updated Firestore node, it should then work, we'll do more testing and will update the node in the explorer. Copy the content from the above file and paste it https://docs.buildship.com/features/copy-paste#paste-node.
Gaurav Chadha
Gaurav Chadha3mo ago
It should work fine with data value - {"dateAt": new Date()}
No description
Gaurav Chadha
Gaurav Chadha3mo ago
Hi @Thomas The node is also updated in the library as well, you can refresh the app and add the nod again.
Thomas
Thomas3mo ago
Dear @Gaurav Chadha perfect! You made my day 🙂 Thanks
Thomas
Thomas3mo ago
Dear @Gaurav Chadha , I discovered an issue in firestore dates: I can now create a date in field "date1" using new Date () in "collection1". Next I take the value of "date1“ to define the field "date2" in "collection2". I get a similar issue like we had before.
No description
No description
Thomas
Thomas3mo ago
Here is what I tried also: wrapping the timestamp into a new Date(). This leads to an error.
No description
No description
Gaurav Chadha
Gaurav Chadha3mo ago
@Thomas it's not an issue with the node this is time in reference works, you'll require to convert the format, you can refer to this https://firebase.google.com/docs/reference/js/v8/firebase.firestore.Timestamp
Thomas
Thomas3mo ago
OK, got it - thanks so much! This helped: https://stackoverflow.com/a/58104246/22473529
Stack Overflow
How do I convert a Firestore date/Timestamp to a JS Date()?
I am trying to convert the below date to a javascript Date() object. When I get it back from the server, it is a Timestamp object, Screenshot from Firebase Firestore console: When I try the foll...
callmeGG
callmeGG3mo ago
Hello folks, since you were playing a lot with timestamp, can you help me with the filter I shoud write to get a document with a specific timestamp? If I don't use any filter the fields looks like this "birthdate": { "_seconds": -79668000, "_nanoseconds": 0 } but even if I filter to look at the specific document I get and empty answer {"operator":"==","value":-79668000,"field":"birthdate._seconds"} same as {"operator":"==","value":-79668000,"field":"birthdate"} Can you help me?