converting DateTime to Date looses time zone information resulting in bad time computing
Specifically, for Tahiti, time zone is -10 so after 14h, UTC time is Tahiti time + 10h i.e the day after. Loosing time zone results in 1 day difference whether the time is computed before of after 14h :-)
This commit is contained in:
parent
5605ceacc2
commit
766e9db752
1 changed files with 1 additions and 1 deletions
|
@ -204,7 +204,7 @@ class StatsController < ApplicationController
|
|||
|
||||
def max_date
|
||||
if administration_signed_in?
|
||||
Time.zone.now.to_date
|
||||
Time.zone.now
|
||||
else
|
||||
Time.zone.now.beginning_of_month - 1.second
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue