From 22e6afe10d1211112d6ea2b7f8e75ef26b5de8d2 Mon Sep 17 00:00:00 2001 From: 20150024 Date: Wed, 20 Jun 2018 12:17:51 +0800 Subject: [PATCH] round step counts per hour --- RCTAppleHealthKit/RCTAppleHealthKit+Queries.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RCTAppleHealthKit/RCTAppleHealthKit+Queries.m b/RCTAppleHealthKit/RCTAppleHealthKit+Queries.m index 5c01cef..2e838fe 100644 --- a/RCTAppleHealthKit/RCTAppleHealthKit+Queries.m +++ b/RCTAppleHealthKit/RCTAppleHealthKit+Queries.m @@ -416,7 +416,7 @@ if (quantity) { NSDate *startDate = result.startDate; NSDate *endDate = result.endDate; - double value = [quantity doubleValueForUnit:unit]; + int value = round([quantity doubleValueForUnit:unit]); int startDateTimestamp = [RCTAppleHealthKit buildTimestampFromDate:startDate]; int endDateTimestamp = [RCTAppleHealthKit buildTimestampFromDate:endDate]; -- 2.26.2