fix timezone - time with local timezone to default timezone
This commit is contained in:
@@ -12,13 +12,13 @@ class Promotion < ApplicationRecord
|
||||
PROMO_TYPE4 = "Percentage"
|
||||
|
||||
def is_promo_day
|
||||
promo_day.include? Date.today.wday.to_s
|
||||
promo_day.include? Date.current.wday.to_s
|
||||
end
|
||||
|
||||
def self.promo_activate(saleObj)
|
||||
current_day = Time.now.strftime("%Y-%m-%d")
|
||||
current_time = Time.now.strftime('%H:%M:%S')
|
||||
day = Date.today.wday
|
||||
current_day = Time.current.strftime("%Y-%m-%d")
|
||||
current_time = Time.current.strftime('%H:%M:%S')
|
||||
day = Date.current.wday
|
||||
promoList = is_between_promo_datetime(current_day,current_time)
|
||||
|
||||
promoList.each do |promo|
|
||||
|
||||
Reference in New Issue
Block a user