Skip to content
This repository has been archived by the owner on Jun 17, 2023. It is now read-only.

Commit

Permalink
fixes arrow parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
sfinlon committed Nov 1, 2019
1 parent 0f0131d commit d5f695a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cif/store/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,13 +396,13 @@ def handle_indicators_search(self, token, data, **kwargs):
if data.get('days'):
now = arrow.utcnow()
data['reporttimeend'] = '{0}Z'.format(now.format('YYYY-MM-DDTHH:mm:ss'))
now = now.replace(days=-int(data['days']))
now = now.shift(days=-int(data['days']))
data['reporttime'] = '{0}Z'.format(now.format('YYYY-MM-DDTHH:mm:ss'))

if data.get('hours'):
now = arrow.utcnow()
data['reporttimeend'] = '{0}Z'.format(now.format('YYYY-MM-DDTHH:mm:ss'))
now = now.replace(hours=-int(data['hours']))
now = now.shift(hours=-int(data['hours']))
data['reporttime'] = '{0}Z'.format(now.format('YYYY-MM-DDTHH:mm:ss'))

s = time.time()
Expand Down

0 comments on commit d5f695a

Please sign in to comment.