Home | History | Annotate | Download | only in logging

Lines Matching refs:day

50 _MIDNIGHT = 24 * 60 * 60  # number of seconds in a day
181 # W{0-6} - roll over on a certain day; 0 - Monday
198 self.interval = 60 * 60 * 24 # one day
204 raise ValueError("You must specify a day for weekly rollover from 0 to 6 (0 is Monday): %s" % self.when)
206 raise ValueError("Invalid day specified for weekly rollover: %s" % self.when)
228 # if you are rolling over at midnight, then your base interval is 1 day,
229 # but you want to start that one day clock at midnight, not now. So, we
246 # If we are rolling over on a certain day, add in the number of days until
248 # until the next day starts. There are three cases:
249 # Case 1) The day to rollover is today; in this case, do nothing
250 # Case 2) The day to rollover is further in the interval (i.e., today is
251 # day 2 (Wednesday) and rollover is on day 6 (Sunday). Days to
253 # Case 3) The day to rollover is behind us in the interval (i.e., today
254 # is day 5 (Saturday) and rollover is on day 3 (Thursday).
257 # of days in the next week until the rollover day (3).
258 # The calculations described in 2) and 3) above need to have a day added.
260 # day, i.e. the start of the next day.
262 day = t[6] # 0 is Monday
263 if day != self.dayOfWeek:
264 if day < self.dayOfWeek:
265 daysToWait = self.dayOfWeek - day
267 daysToWait = 6 - day + self.dayOfWeek + 1