Skip to content

Commit

Permalink
Fix #1180 file_time_limit evaluation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
petersilva committed Aug 22, 2024
1 parent e197369 commit f99f94b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sarra/sr_poll.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def differ_ls_file(self, ls, lspath):
date = line_split[5] + " " + line_split[6]
file_date = parse(date)
current_date = datetime.datetime.now()
file_within_date_limit = abs((file_date - current_date).seconds) < self.file_time_limit
file_within_date_limit = abs((current_date - file_date).total_seconds()) < self.file_time_limit
except:
self.logger.error("Assuming ok, incorrect date format for line: %s" % ls[f])
if not dateparser_available:
Expand Down

0 comments on commit f99f94b

Please sign in to comment.