diff options
author | 2018-03-30 14:50:15 -0400 | |
---|---|---|
committer | 2018-03-30 14:50:15 -0400 | |
commit | a17740e9146e4e2431d62964d044287cccc3ee85 (patch) | |
tree | 479f280a07f4200924e0ef7cce183aa35e14c5bb /Firestore/Source/API/FIRTimestamp.m | |
parent | 653aea7b50247bb0f6a7e8e1b4ab782553849f74 (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/Source/API/FIRTimestamp.m')
-rw-r--r-- | Firestore/Source/API/FIRTimestamp.m | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Firestore/Source/API/FIRTimestamp.m b/Firestore/Source/API/FIRTimestamp.m index 489b921..e5a2cd3 100644 --- a/Firestore/Source/API/FIRTimestamp.m +++ b/Firestore/Source/API/FIRTimestamp.m @@ -121,7 +121,7 @@ static const int kNanosPerSecond = 1000000000; #pragma mark - Public methods -- (NSDate *)approximateDateValue { +- (NSDate *)dateValue { NSTimeInterval interval = (NSTimeInterval)self.seconds + ((NSTimeInterval)self.nanoseconds) / 1e9; return [NSDate dateWithTimeIntervalSince1970:interval]; } |