Skip to content

Manual Timestamps are being changed #105

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

Closed
ftzi opened this issue Nov 16, 2021 · 4 comments
Closed

Manual Timestamps are being changed #105

ftzi opened this issue Nov 16, 2021 · 4 comments

Comments

@ftzi
Copy link

ftzi commented Nov 16, 2021

Example:

await set(users, 'a', {
  a: new Date(0),
  b: firebase.firestore.Timestamp.fromDate(new Date(0)),
} as any);
await db.doc('users/b').set({ c: firebase.firestore.Timestamp.fromDate(new Date(0)) });

image
image

It's not trivial. It's not allowing my query that compares Date to work, ex where('myField', '>', new Date(0)),. The query doesn't work in the {_seconds} object, only when it's a proper Timestamp.

Using v8 version.

I am out of time currently, I will try to quickly fix it and make a PR if I can do it.

@ftzi
Copy link
Author

ftzi commented Nov 16, 2021

I though it was an Emulator issue: firebase/firebase-tools#3900

This was referenced Nov 16, 2021
@KoreanThinker
Copy link

@SrBrahma is there a temporary solution??

@ftzi
Copy link
Author

ftzi commented Dec 1, 2021

@SrBrahma is there a temporary solution??

Yes! I have made some PRs for this and other bugs. While they are not accepted, you can use them via npm i typesaurus@srbrahma/typesaurus#lib IIRC. If the command is wrong, just Google 'npm/yarn install fork'

It's source is https://github.com/SrBrahma/typesaurus/tree/v8, using the branch v8 of typesaurus, a branch that is better than the master one.

@kossnocorp
Copy link
Owner

I don't think it's relevant, but if it does please open a new issue with more details

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

Successfully merging a pull request may close this issue.

3 participants