Skip to content

Commit

Permalink
Merge pull request #10 from MO-RISE/fix/explicit-string-to-float-conv…
Browse files Browse the repository at this point in the history
…ersion

Explicitly converting any timestamps as strings to floats to ensure c…
  • Loading branch information
freol35241 authored Aug 11, 2023
2 parents 7cdf679 + 5577cf6 commit fe98998
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def extract_values_from_message(message: MQTTMessage) -> Tuple[Any]:
fields["parameter_id"] = f"{fields.pop('tag')}_{fields.pop('index')}"

# Convert timestamp into datetime format
fields["timestamp"] = datetime.fromtimestamp(fields["timestamp"])
fields["timestamp"] = datetime.fromtimestamp(float(fields["timestamp"]))

LOGGER.debug("After conversions: %s", fields)

Expand Down

0 comments on commit fe98998

Please sign in to comment.