summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorBrad Leege <bleege@gmail.com>2015-04-27 18:44:51 -0400
committerBrad Leege <bleege@gmail.com>2015-04-27 18:44:51 -0400
commit2b4969b5dc487479154837ba3ab13fab10efc0e1 (patch)
treeb52e1a063155c2ee6fec62d9d8490af6a5da73a8 /platform
parent16bcdb10b840b9063acd1894aba3cf395cd90bf2 (diff)
downloadqtlocation-mapboxgl-2b4969b5dc487479154837ba3ab13fab10efc0e1.tar.gz
#1352 - Adding date checker to arrival and departure date to make arrival / departure determination easier
Diffstat (limited to 'platform')
-rw-r--r--platform/ios/MGLMetricsLocationManager.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/ios/MGLMetricsLocationManager.m b/platform/ios/MGLMetricsLocationManager.m
index 348c4e5ad9..b64fc44c15 100644
--- a/platform/ios/MGLMetricsLocationManager.m
+++ b/platform/ios/MGLMetricsLocationManager.m
@@ -80,8 +80,8 @@
MGLEventKeyLatitude: @(visit.coordinate.latitude),
MGLEventKeyLongitude: @(visit.coordinate.longitude),
MGLEventKeyHorizontalAccuracy: @(visit.horizontalAccuracy),
- MGLEventKeyArrivalDate: [_rfc3339DateFormatter stringFromDate:visit.arrivalDate],
- MGLEventKeyDepartureDate: [_rfc3339DateFormatter stringFromDate:visit.departureDate],
+ MGLEventKeyArrivalDate: [[NSDate distantPast] isEqualToDate:visit.arrivalDate] ? [NSNull null] : [_rfc3339DateFormatter stringFromDate:visit.arrivalDate],
+ MGLEventKeyDepartureDate: [[NSDate distantFuture] isEqualToDate:visit.departureDate] ? [NSNull null] : [_rfc3339DateFormatter stringFromDate:visit.departureDate]
}];
}