Facing an error that says cannot upload timestamp to the appwrite database due to invalid range.
TL;DR
Developers were facing an issue uploading timestamps to the appwrite DB due to a range error. The solution provided was to use Math.floor(Date.now() / 1000) instead.
D5
7 May, 2024, 10:22
How does the timestamp looks like?
rudra_2001
7 May, 2024, 10:22
rudra_2001
7 May, 2024, 10:23
wait
rudra_2001
7 May, 2024, 10:23
this is incorrect
rudra_2001
7 May, 2024, 10:24
this is the correct one
rudra_2001
7 May, 2024, 10:24
Never mind I solved it
rudra_2001
7 May, 2024, 10:25
I had to use this method = Math.floor(Date.now() / 1000)
D5
7 May, 2024, 10:33
But the range is between 32 and 64 and the timestamp is a lot more