[gnome-clocks] AlarmItem: Fix expiration time



commit 14c3d4dada919c62a6d1b9d49221c966b4b94e66
Author: Volker Sobek <reklov live com>
Date:   Tue Nov 13 00:59:48 2012 +0100

    AlarmItem: Fix expiration time
    
    Remove seconds and microseconds from the expiration time. So far the
    exact alarm time depended on the second the user saved the alarm. Now
    the alarm always starts at full minutes.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=688215

 gnomeclocks/alarm.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gnomeclocks/alarm.py b/gnomeclocks/alarm.py
index 44fe3a9..f50f80f 100644
--- a/gnomeclocks/alarm.py
+++ b/gnomeclocks/alarm.py
@@ -89,7 +89,7 @@ class AlarmItem:
 
     def update_expiration_time(self):
         now = datetime.now()
-        dt = now.replace(hour=self.hour, minute=self.minute)
+        dt = now.replace(hour=self.hour, minute=self.minute, second=0, microsecond=0)
         # check if it can ring later today
         if dt.weekday() not in self.days or dt <= now:
             # otherwise if it can ring this week



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]