Skip to content

Commit

Permalink
Support explicit timestamp from CLI argument
Browse files Browse the repository at this point in the history
  • Loading branch information
patrislav1 committed May 10, 2023
1 parent 6f66905 commit 0b3cdf7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frugy/areas.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ class BoardInfo(FruAreaSized):

def _set_mfg_date_time(self, timestamp):
if timestamp is not None:
if type(timestamp) == str:
timestamp = datetime.fromisoformat(timestamp)
td = timestamp - BoardInfo._time_ref
minutes = td.seconds // 60 + td.days * (60*24)
self._set('mfg_date_time', minutes)
Expand Down

0 comments on commit 0b3cdf7

Please # to comment.