]> granicus.if.org Git - python/commitdiff
test_logging: Changed TimedRotatingFileHandler tests to use UTC time rather than...
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Sat, 26 Feb 2011 07:18:22 +0000 (07:18 +0000)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Sat, 26 Feb 2011 07:18:22 +0000 (07:18 +0000)
Lib/test/test_logging.py

index f534cac7dc2a57fdd6daa81d2a885a1eeec51761..f9da87b6f1fb195958a8d2d8327551dcb3a4184e 100644 (file)
@@ -2044,13 +2044,13 @@ for when, exp in (('S', 1),
                   ('M', 60),
                   ('H', 60 * 60),
                   ('D', 60 * 60 * 24),
-                  ('MIDNIGHT', 60 * 60 * 23),
+                  ('MIDNIGHT', 60 * 60 * 24),
                   # current time (epoch start) is a Thursday, W0 means Monday
-                  ('W0', secs(days=4, hours=23)),
+                  ('W0', secs(days=4, hours=24)),
                  ):
     def test_compute_rollover(self, when=when, exp=exp):
         rh = logging.handlers.TimedRotatingFileHandler(
-            self.fn, when=when, interval=1, backupCount=0)
+            self.fn, when=when, interval=1, backupCount=0, utc=True)
         currentTime = 0.0
         actual = rh.computeRollover(currentTime)
         if exp != actual: