Use time.zone functions instead of server time functions

(Time.zone.today vs Date.today)
This commit is contained in:
maatinito 2019-11-25 13:39:42 +00:00 committed by Pierre de La Morinerie
parent 14bc2b99b9
commit 9de9a1fd71
7 changed files with 10 additions and 10 deletions

View file

@ -35,7 +35,7 @@ class Helpscout::UserConversationsAdapter
end
def fetch_productivity_report(year, month)
if year == Date.today.year && month == Date.today.month
if year == Time.zone.today.year && month == Time.zone.today.month
raise ArgumentError, 'The report for the current month will change in the future, and cannot be cached.'
end