jwoglom / tconnectsync

Syncs insulin pump data from Tandem t:connect to Nightscout for the t:slim X2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inconsistent use of time/date filters

jwoglom opened this issue · comments

Tandem API methods only support filtering by date. However the sync time range contains a time element, and by default is expressed as (now - 24 hrs, now). When calling most API endpoints, the time is cut off from the datetime object passed to the function and just the raw dates are used to query the API and return results. This ends up fetching twice as much data as is necessary in cases where the API parses dates inclusively.