- while ((day[time.localtime(self.begin).tm_wday] != 0) and (self.end < now)):
- print str(now) + " " + str(self.end) + " " + str(self.begin)
- self.begin += 86400
- self.end += 86400
-
-
+ print time.strftime("%c", localnow)
+ while ((day[localbegin.tm_wday] != 0) or ((day[localbegin.tm_wday] == 0) and localend < localnow)):
+ print time.strftime("%c", localbegin)
+ print time.strftime("%c", localend)
+ #add one day to the struct_time, we have to convert using gmt functions, because the daylight saving flag might change after we add our 86400 seconds
+ localbegin = time.gmtime(calendar.timegm(localbegin) + 86400)
+ localend = time.gmtime(calendar.timegm(localend) + 86400)
+
+ #we now have a struct_time representation of begin and end in localtime, but we have to calculate back to (gmt) seconds since epoch
+ self.begin = int(time.mktime(localbegin))
+ self.end = int(time.mktime(localend)) + 1
+
+ print "ProcessRepeated result"
+ print time.strftime("%c", time.localtime(self.begin))
+ print time.strftime("%c", time.localtime(self.end))
+
+ self.timeChanged()
+
+ def __lt__(self, o):
+ return self.getNextActivation() < o.getNextActivation()
+
+ # must be overridden
+ def activate(self):
+ pass