diff options
author | Alex Legler <a3li@gentoo.org> | 2012-08-19 18:39:57 +0200 |
---|---|---|
committer | Alex Legler <a3li@gentoo.org> | 2012-08-19 18:39:57 +0200 |
commit | e186e2d344d63454fb0c0b3cf84342f5bb98a80a (patch) | |
tree | e3ed8e54dcad45fe68a324053d10a49cdcc66cf5 /app | |
parent | Add meaningful page titles (diff) | |
download | glsamaker-e186e2d344d63454fb0c0b3cf84342f5bb98a80a.tar.gz glsamaker-e186e2d344d63454fb0c0b3cf84342f5bb98a80a.tar.bz2 glsamaker-e186e2d344d63454fb0c0b3cf84342f5bb98a80a.zip |
Bug #184: Fix archive display for releases at the last day of the month
Thanks to ackle for the patch
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/glsa_controller.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/glsa_controller.rb b/app/controllers/glsa_controller.rb index c3e2faa..ecc2768 100644 --- a/app/controllers/glsa_controller.rb +++ b/app/controllers/glsa_controller.rb @@ -34,9 +34,9 @@ class GlsaController < ApplicationController month_start = Date.new(@year, @month, 1) if @month == 12 - month_end = Date.new(@year + 1, 1, 1) -1 + month_end = DateTime.new(@year + 1, 1, 1, 23, 59, 59) -1 else - month_end = Date.new(@year, @month + 1, 1) - 1 + month_end = DateTime.new(@year, @month + 1, 1, 23, 59, 59) - 1 end @glsas = Glsa.where(:status => 'release', :first_released_at => month_start..month_end).order('updated_at DESC') @@ -49,9 +49,9 @@ class GlsaController < ApplicationController month_end = nil if @month == 12 - month_end = Date.new(@year + 1, 1, 1) -1 + month_end = DateTime.new(@year + 1, 1, 1, 23, 59, 59) -1 else - month_end = Date.new(@year, @month + 1, 1) - 1 + month_end = DateTime.new(@year, @month + 1, 1, 23, 59, 59) - 1 end @glsas = Glsa.where(:status => 'release', :first_released_at => month_start..month_end).order('updated_at DESC') |