recent-bugs: Simplify.
authorRicardo Wurmus <rekado@elephly.net>
Mon, 3 Sep 2018 14:04:29 +0000 (16:04 +0200)
committerRicardo Wurmus <rekado@elephly.net>
Mon, 3 Sep 2018 14:04:29 +0000 (16:04 +0200)
mumi/messages.scm

index 5a14f6af4482a3f51b4df7708ab4b4e7b237614f..7a297398f6a6f3802309e55deb03dabcf3324c4c 100644 (file)
@@ -316,15 +316,7 @@ of message parts."
                         #:max 50
                         #:attributes
                         `((package string-prefix "guix")
-                          (@cdate >= ,(let ((this-hour
-                                             (date->time-utc (let ((now (current-date)))
-                                                               (make-date 0 0 0 (date-hour now)
-                                                                          (date-day now)
-                                                                          (date-month now)
-                                                                          (date-year now) 0))))
-                                            (one-month
-                                             (make-time time-duration 0 (* 60 60 24 30))))
-                                        (time-second (subtract-duration this-hour one-month)))))))
+                          (@cdate >= ,(time-second (ago 'months 1))))))
          (unique (delete-duplicates
                   (filter-map (lambda (item)
                                 (assoc-ref item "id"))