From 040c0a7ad272d17a4965513b2997290cfc7d1ced Mon Sep 17 00:00:00 2001 From: Eric Wollesen Date: Mon, 9 Feb 2026 12:03:59 +0100 Subject: [PATCH] add option to exclude localTime when exporting data The localTime value can, under specific circumstances, be inaccurate. BACK-4205 --- index.js | 5 +++-- package.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index e365a04..04d6619 100644 --- a/index.js +++ b/index.js @@ -247,8 +247,9 @@ export default class TidepoolDataTools { static tidepoolProcessor(processorConfig = {}) { return es.mapSync((data) => { - // Synthesize the 'localTime' field - this.addLocalTime(data); + if (!processorConfig.excludeLocalTime) { + this.addLocalTime(data); + } // Stringify objects configured with { "stringify": true } this.stringifyFields(data); // Convert BGL data to mg/dL if configured to do so diff --git a/package.json b/package.json index ee48a72..e322e91 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tidepool/data-tools", - "version": "2.4.2", + "version": "2.5.0", "description": "Export data from the Tidepool API to various file formats", "repository": { "type": "git",