[SOLVED] How to query documents using a date field, having in consideration timezones?
- 0
- Databases
- Flutter
Lets say I save a document at 05:00 am GTM-6 on feb 01, it will be saved in the database in UTC as 23:00 of January 21, If I query my documents of Feb 01, that specific document wont appear, is there a way to handle this?
I'd guess the best way is to do a between query. Query.greater() AND Query.less()
You'll need to make the proper index for it, but that should do the trick. You just need to calculate the beginning and end of the timezone's day.
When you query using listDocuments() the query parameter is a list of queries that are AND-ed together, so you just need both those greater and less queries in there.
Thank you very much tanner 😄
Do you mind marking this [SOLVED] in the title?
[solved How to query documents using a date field, having in consideration timezones?
[SOLVED] How to query documents using a date field, having in consideration timezones?
Recommended threads
- HUGE OUTRAGE IN APPWRITE, I CANNOT ACCES...
I have 2k users trying to access, sending me messages. What am I supposed to do? Please solve this asap.
- All my apps are not opening now
All my apps are not opening now 200+ apps are not opening plz fast
- Failed to generate functions SSL
```appwrite-worker-certificates | Cannot renew domain (functions.domain.com) on attempt no. 9 certificate: Failed to verify domain DNS records. appwrite-worker...