aboutsummaryrefslogtreecommitdiffstats
path: root/lib/logger.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-27 07:18:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-27 07:18:14 +0000
commit6df21cb46945250439a82f515b2971a1b6ae8f21 (patch)
tree245c06b486c7a86491c0d7e98f299354065a081f /lib/logger.rb
parent17e5dff210df9aa7a9203ffdb3b78e6b9cfc5a46 (diff)
downloadruby-6df21cb46945250439a82f515b2971a1b6ae8f21.tar.gz
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
Diffstat (limited to 'lib/logger.rb')
-rw-r--r--lib/logger.rb2
1 files changed, 1 insertions, 1 deletions
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