Timestamps across timezones?

Hi, I have an app that allows a user to do an action once every 45 minutes. when the action happens, I store a timestamp date+time in the DB.
Then I have a visibility rules that check that the future timestamp I stored is 45 mins after the initial timestamp.

Times is checked at the device level on adalo, so a few users now change the time on their devices and are able to do the action again. Any idea how I can store time + date in a universal way so it cannot be tricked with the device date+ time?

thank you

Call a time API which returns the current time and store that as the timestamp.

For ease of querying, you might want to consider storing day of month as its own field as an integer. Same with month and year, hour, minute and seconds as well as the timestamp and milliseconds since the epoch.

https://www.timeapi.io/swagger/index.html

1 Like