diff options
author | Brad Leege <bleege@gmail.com> | 2015-04-27 18:44:51 -0400 |
---|---|---|
committer | Brad Leege <bleege@gmail.com> | 2015-04-27 18:44:51 -0400 |
commit | 2b4969b5dc487479154837ba3ab13fab10efc0e1 (patch) | |
tree | b52e1a063155c2ee6fec62d9d8490af6a5da73a8 /platform | |
parent | 16bcdb10b840b9063acd1894aba3cf395cd90bf2 (diff) | |
download | qtlocation-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.m | 4 |
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] }]; } |