Adding time to Firestore serverTimestamp()
问题 Is there a way to add time to a server timestamp without using cloud functions? What I want is to update a timestamp from a panel, and have the user side check if the timestamp is greater than the current time. I also would like for the panel user to be able to set the amount of time to add, so doing the logic on the user side is not an optimal solution. Example: document.set({ validTo: firestore.FieldValue.serverTimestamp() + 5000 }); 回答1: You can't perform date math on server timestamps on