aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/CHANGELOG.md
diff options
context:
space:
mode:
authorGravatar Konstantin Varlamov <var-const@users.noreply.github.com>2018-03-30 14:50:15 -0400
committerGravatar GitHub <noreply@github.com>2018-03-30 14:50:15 -0400
commita17740e9146e4e2431d62964d044287cccc3ee85 (patch)
tree479f280a07f4200924e0ef7cce183aa35e14c5bb /Firestore/CHANGELOG.md
parent653aea7b50247bb0f6a7e8e1b4ab782553849f74 (diff)
Add a flag to control whether DocumentSnapshots return Dates or Timestamps for timestamp fields (#831)
* add a new property `timestampsInSnapshotsEnabled` to `FirestoreSettings`, `false` by default; * add a verbose warning message urging users to opt into the new behavior; * set `timestampsInSnapshotsEnabled` to true in the integration tests to reduce the verbose console spam during the test run and make sure the flag won't break anything once it's flipped.
Diffstat (limited to 'Firestore/CHANGELOG.md')
-rw-r--r--Firestore/CHANGELOG.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/Firestore/CHANGELOG.md b/Firestore/CHANGELOG.md
index c0fa621..a0493d7 100644
--- a/Firestore/CHANGELOG.md
+++ b/Firestore/CHANGELOG.md
@@ -2,6 +2,16 @@
- [fixed] Fixed a regression in the Firebase iOS SDK release 4.11.0 that could
cause `getDocument()` requests made while offline to be delayed by up to 10
seconds (rather than returning from cache immediately).
+- [feature] Added a new `Timestamp` class to represent timestamp fields,
+ currently supporting up to microsecond precision. It can be passed to API
+ methods anywhere a system Date is currently accepted. To make
+ `DocumentSnapshot`s read timestamp fields back as `Timestamp`s instead of
+ Dates, you can set the newly added property `areTimestampsInSnapshotsEnabled`
+ in `FirestoreSettings` to `true`. Note that the current behavior
+ (`DocumentSnapshot`s returning system Dates) will be removed in a future
+ release. Using `Timestamp`s avoids rounding errors (system Date is stored as
+ a floating-point value, so the value read back from a `DocumentSnapshot`
+ might be slightly different from the value written).
# v0.10.4
- [changed] If the SDK's attempt to connect to the Cloud Firestore backend