From 6df21cb46945250439a82f515b2971a1b6ae8f21 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 27 Oct 2015 07:18:14 +0000 Subject: logger.rb: end of week should be Saturday * lib/logger.rb (Logger::Period#previous_period_end): as weekly rotation shifts the log file on Sundays, the end date of the previous period should be Saturdays. fix r45072. [ruby-dev:49314] [Bug #11622] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/logger.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/logger.rb b/lib/logger.rb index 354d5aff71..f15a85077e 100644 --- a/lib/logger.rb +++ b/lib/logger.rb @@ -556,7 +556,7 @@ private when 'daily' t = Time.mktime(now.year, now.month, now.mday) - SiD / 2 when 'weekly' - t = Time.mktime(now.year, now.month, now.mday) - (SiD * (now.wday + 1) + SiD / 2) + t = Time.mktime(now.year, now.month, now.mday) - (SiD * now.wday + SiD / 2) when 'monthly' t = Time.mktime(now.year, now.month, 1) - SiD / 2 else -- cgit v1.2.3