Skip to content
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

Add support for mocking server timestamp #238

Closed
AndrasTimar opened this issue Sep 5, 2022 · 5 comments
Closed

Add support for mocking server timestamp #238

AndrasTimar opened this issue Sep 5, 2022 · 5 comments

Comments

@AndrasTimar
Copy link

I would like to propose the use of the clock package, which would make it possible to mock the server timestamp. Now the code uses Timestamp.now(), which in return uses DateTime.now(), which can not be changed from the outside.

@ming-chu
Copy link
Contributor

ming-chu commented Dec 1, 2022

Hi @AndrasTimar , would you mind share more information about the clock package?

@AndrasTimar
Copy link
Author

Hi @AndrasTimar , would you mind share more information about the clock package?

Sure, you can read about it here: https://pub.dev/packages/clock

@atn832
Copy link
Owner

atn832 commented Dec 30, 2022

That sounds great! Would you be able to contribute a PR for it?

@ming-chu
Copy link
Contributor

I created a PR for this.
#287

Sorry, I am late........very late.

@atn832
Copy link
Owner

atn832 commented Jan 4, 2024

Thanks to @ming-chu for implementing this. I just published it to https://pub.dev/packages/fake_cloud_firestore/changelog#246.

@atn832 atn832 closed this as completed Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants