Convert Date to ISO string in functions #4887
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #683
Also see #4450
Currently httpsCallable functions serialize any
Date
objects passed to them to an empty object ({}
). In the absence of a comprehensive Date type shared across all the SDK client platforms plus the functions backend, which may or may not happen, we should at least convert it to an ISO string.We are not automatically deserializing ISO strings because the developer may intentionally be passing that string down from the cloud function.