Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions decocare/cgm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ def decode (self):
record = self.decode_record(B[0], stream, timestamp)

if record['name'] == 'SensorTimestamp':
if 'date' not in record:
# should I log that I discard the record? is the record relevant without a 'date'?
# print(record) or log.warn
continue

timestamp = parser.parse(record['date'])
elif self.is_relative_record(record) and timestamp:
timestamp = timestamp + relativedelta(minutes=-5)
Expand Down