Skip to content

Commit

Permalink
allow get_timeinfo to return subhr
Browse files Browse the repository at this point in the history
  • Loading branch information
dougiesquire committed Aug 10, 2023
1 parent 60a51a5 commit 5f2dbb2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/access_nri_intake/source/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,11 @@ def _todate(t):
frequency = f"{months}mon"
elif dt.days >= 1:
frequency = f"{dt.days}day"
elif dt.seconds >= 3600:
hours = round(dt.seconds / 3600)
frequency = f"{hours}hr"
else:
frequency = f"{dt.seconds // 3600}hr"
frequency = "subhr"

start_time = ts.strftime(time_format)
end_time = te.strftime(time_format)
Expand Down

0 comments on commit 5f2dbb2

Please sign in to comment.