chore: Consider inbox.timezone in open_at logic (#2183)

Co-authored-by: Sojan Jose <sojan@pepalo.com>
This commit is contained in:
Vishal Pandey 2021-08-12 02:29:15 +05:30 committed by GitHub
parent 1f59205f20
commit 21d2b4d918
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,7 +50,8 @@ class WorkingHour < ApplicationRecord
end end
def open_now? def open_now?
open_at?(Time.zone.now) inbox_time = Time.zone.now.in_time_zone(inbox.timezone)
open_at?(inbox_time)
end end
def closed_now? def closed_now?