From 6bbb80d9d30cd50cfd5d4133adca6dd23ae14bed Mon Sep 17 00:00:00 2001 From: Chris Schaefbauer Date: Tue, 6 Oct 2015 13:25:37 -0600 Subject: [PATCH 1/2] Add extra day to enddate for Jawbone requests We are inclusive of the last date in our requests for data, however the date times that we use are at beginning of day, meaning that previously we were requesting data until the beginning of the final day. But any activities that occurred on that day would be missed. This change adds an extra day to the enddate of the request so that it requests activities that occurred until the beginning of the next day, which covered the entirety of the final day. --- .../main/java/org/openmhealth/shim/jawbone/JawboneShim.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shim-server/src/main/java/org/openmhealth/shim/jawbone/JawboneShim.java b/shim-server/src/main/java/org/openmhealth/shim/jawbone/JawboneShim.java index f0f58851..64473f09 100644 --- a/shim-server/src/main/java/org/openmhealth/shim/jawbone/JawboneShim.java +++ b/shim-server/src/main/java/org/openmhealth/shim/jawbone/JawboneShim.java @@ -162,8 +162,10 @@ protected ResponseEntity getData(OAuth2RestOperations restTemp today.minusDays(1) : shimDataRequest.getStartDateTime(); long startTimeInEpochSecond = startDateTime.toEpochSecond(); + // We are inclusive of the last day, so we need to add an extra day since we are dealing with start of day, + // and would miss the activities that occurred during the last day within going to midnight of that day OffsetDateTime endDateTime = shimDataRequest.getEndDateTime() == null ? - today.plusDays(1) : shimDataRequest.getEndDateTime(); + today.plusDays(1) : shimDataRequest.getEndDateTime().plusDays(1); long endTimeInEpochSecond = endDateTime.toEpochSecond(); UriComponentsBuilder uriComponentsBuilder = From 68c00514e36aac1e7c08dba325684956eb444204 Mon Sep 17 00:00:00 2001 From: Emerson Farrugia Date: Tue, 6 Oct 2015 22:03:37 +0200 Subject: [PATCH 2/2] Prepare version for release --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index c50d9b4d..5ec4ec59 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ subprojects { ext { javaVersion = 1.8 - shimmerVersion = '0.3.0.SNAPSHOT' + shimmerVersion = '0.3.1' omhSchemaSdkVersion = '1.0.3' }