-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cloud_Firestore store query returns null when the app is used in a different time zone : Flutter #2685
Comments
Hi @momo1606 |
C:\Users\G5\AndroidStudioProjects\akhul_qurani>flutter doctor -v C:\Users\G5\AndroidStudioProjects\akhul_qurani> [!] Android toolchain - develop for Android devices (Android SDK version 29.0.3) [√] Android Studio (version 3.6) [!] IntelliJ IDEA Ultimate Edition (version 2018.3) [√] VS Code (version 1.45.1) [!] Connected device ! Doctor found issues in 3 categories. flutter run --verbose |
Code- this is what i executed for test purpose
|
flutter doctor -v
|
Ive tested this with the rework that is currently in progress When you pass As you're using "isEqualTo" it's looking for that exact timestamp. If you want to get all documents for the whole day, you need to use multiple where statements like so
Can you confirm this works please, and if you still experience the issue, report back, |
I have developed an app in UAE(GMT +4 gulf standard time). When the following query is executed with system time zone being as mentioned above , i get the required data. When the app is used in a different country or if i change my system time to a different time zone(i changed it to GMT+5:30 Indian standard time), the query returns null and i get an error when extracting the data.
Data is present in cloud firestore no matter what time is fetched using DateTime.now().
Even if I use DateTime.now().toUtc() i get the same error.
i also queried the above using static values instead of DateTime generated values.
now with my system time being set to time zone GMT+4 i get the data and am able to execute the print statement
and after changing my system time to a different timezone(this time GMT+3 Arabian Standars Time) i ran across this error while executing the same function.
Is the issue with the cloud_function package? i am using cloud_firestore: ^0.13.5
i could also create a document in firestore with any time zone.
So the problem is with the read operations.
these are the logs
The text was updated successfully, but these errors were encountered: