From c267a764b80da4f5895e5bdf23f485941f35f220 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Mon, 8 Sep 2014 14:56:24 +0200 Subject: [PATCH] utc --- app/controllers/public/articles_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/public/articles_controller.rb b/app/controllers/public/articles_controller.rb index 34244c1..af960bc 100644 --- a/app/controllers/public/articles_controller.rb +++ b/app/controllers/public/articles_controller.rb @@ -64,8 +64,8 @@ class Public::ArticlesController < ApplicationController end def archives - @month = Date.parse("#{params[:year]}/#{params[:month]}").beginning_of_month - @articles = Article.recents.where("enabled = ? and published_at >= ? and published_at <= ?", true, @month, @month.end_of_month ).before(Date.today) + @month = Date.parse("#{params[:year]}/#{params[:month]}").utc.beginning_of_month + @articles = Article.recents.where("enabled = ? and published_at >= ? and published_at <= ?", true, @month, @month.utc.end_of_month ).before(Date.utc.today) @articles = @articles.page(params[:page]).per(10) @title = "Articles du blog" if [4,8].include?(@month.month)