Query on Datetime attribute by server time

  • 0
  • Databases
  • Self Hosted
  • Cloud
2 Apr, 2024, 13:33

Is there a way to query database documents by the server time (e.g. "now()")? Querying by the client time (e.g. seems a bit unreliable and is not useable where the current time really matters, like expiration dates.

Developers are discussing the best practice for saving datetimes in the database. They are debating whether to save datetimes in UTC or convert local time to UTC before saving. There is a query about how to retrieve database documents by the server time (e.g. "now()") rather than the client time (e.g. for cases where current time accuracy is crucial.
2 Apr, 2024, 13:40

No. Although you proxy through a Function?

2 Apr, 2024, 13:50

Should you save datetimes in your DB as UTC and convert local time to UTC?


Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more