From 2577193bdf0647e87d01d29294ba58612b9f64f9 Mon Sep 17 00:00:00 2001
From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch>
Date: Sun, 4 Mar 2018 22:25:18 +0100
Subject: [PATCH] Use HumanSince() for grace notification delta.

Refers to #6, #25
---
 ATxService/Email.cs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ATxService/Email.cs b/ATxService/Email.cs
index 4811a89..64c6995 100644
--- a/ATxService/Email.cs
+++ b/ATxService/Email.cs
@@ -210,9 +210,9 @@ namespace ATxService
             if (string.IsNullOrEmpty(report))
                 return "";
 
-            var delta = TimeUtils.MinutesSince(_status.LastGraceNotification);
-            report += $"\nTime since last grace notification: {TimeUtils.MinutesToHuman(delta)}\n";
-            if (delta < _config.GraceNotificationDelta)
+            report += "\nTime since last grace notification: " +
+                      $"{TimeUtils.HumanSince(_status.LastGraceNotification)}\n";
+            if (TimeUtils.MinutesSince(_status.LastGraceNotification) < _config.GraceNotificationDelta)
                 return report;
 
             _status.LastGraceNotification = DateTime.Now;
-- 
GitLab