Skip to content

Commit

Permalink
Timestamp formatting + version number for new release
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentinBulotAQ committed Feb 27, 2019
1 parent 05f187a commit 8d71e82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sensirion_sps030/sensirion_sps030.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(self, line):
"""
if len(line) < 46:
raise SensirionException("Data too short to parse")
self.timestamp = datetime.utcnow()
self.timestamp = datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S")
self.pm1 = round(struct.unpack('>f', line[5:9])[0], 1)
self.pm25 = round(struct.unpack('>f', line[9:13])[0], 1)
self.pm4 = round(struct.unpack('>f', line[13:17])[0], 1)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="sensirion sps030",
version="0.0.6",
version="0.0.7",
author="Florentin Bulot",
author_email="[email protected]",
description="An interface for Sensirion SPS030 particulate matter sensors",
Expand Down

0 comments on commit 8d71e82

Please sign in to comment.