From 21d2b4d9182996567d94b291398bd4c84f2c7e59 Mon Sep 17 00:00:00 2001 From: Vishal Pandey Date: Thu, 12 Aug 2021 02:29:15 +0530 Subject: [PATCH] chore: Consider inbox.timezone in open_at logic (#2183) Co-authored-by: Sojan Jose --- app/models/working_hour.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/working_hour.rb b/app/models/working_hour.rb index 5874af20d..b37be4eb1 100644 --- a/app/models/working_hour.rb +++ b/app/models/working_hour.rb @@ -50,7 +50,8 @@ class WorkingHour < ApplicationRecord end def open_now? - open_at?(Time.zone.now) + inbox_time = Time.zone.now.in_time_zone(inbox.timezone) + open_at?(inbox_time) end def closed_now?