Skip to content

Commit

Permalink
Handle context aware printing of negative diffs correctly
Browse files Browse the repository at this point in the history
Related to martomi#375
  • Loading branch information
jinnatar committed Feb 23, 2023
1 parent 814fd32 commit e00ab94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chia_log/handlers/wallet_peak_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def handle(self, logs: str, stats_manager: Optional[StatsManager] = None) -> Lis
return events

def _context_aware_duration(self, duration: datetime.timedelta) -> str:
if duration.total_seconds() > 0.0 and duration < datetime.timedelta(minutes=30):
if abs(duration.total_seconds()) < 1800.0: # 30 minutes
return f"{duration.total_seconds():.0f}s"
else:
return f"{duration} (Are you sure your timezone is set correctly?)"

0 comments on commit e00ab94

Please sign in to comment.