remove unnessary timezone convertion
This commit is contained in:
@@ -52,8 +52,8 @@ class Reports::HourlySaleitemController < BaseReportController
|
||||
|
||||
if shift.present?
|
||||
shift.each do |sh|
|
||||
@shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.utc.getlocal.strftime("%e %b %I:%M%p")
|
||||
@shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.utc.getlocal.strftime("%e %b %I:%M%p")
|
||||
@shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.strftime("%e %b %I:%M%p")
|
||||
@shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.strftime("%e %b %I:%M%p")
|
||||
@shift_data = sh
|
||||
end
|
||||
end
|
||||
@@ -73,8 +73,8 @@ class Reports::HourlySaleitemController < BaseReportController
|
||||
sale_data = @sale_data
|
||||
date_arr = Array.new
|
||||
@sale_data.each do |sale|
|
||||
local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc.getlocal.strftime("%e %b %I:%M%p")
|
||||
local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc.getlocal.strftime("%e %b %I:%M%p")
|
||||
local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.strftime("%e %b %I:%M%p")
|
||||
local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.strftime("%e %b %I:%M%p")
|
||||
opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc
|
||||
closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc
|
||||
shift_id = sale.id.nil? ? '-' : sale.id
|
||||
@@ -114,7 +114,7 @@ class Reports::HourlySaleitemController < BaseReportController
|
||||
end
|
||||
end
|
||||
|
||||
sh_name = "#{shift_sale.shift_started_at.utc.getlocal.strftime('%d %B %l:%M%p')} - #{shift_sale.shift_closed_at.utc.getlocal.strftime('%d %B %l:%M%p')}"
|
||||
sh_name = "#{shift_sale.shift_started_at.strftime('%d %B %l:%M%p')} - #{shift_sale.shift_closed_at.strftime('%d %B %l:%M%p')}"
|
||||
employee = Employee.find(shift_sale.employee_id)
|
||||
shift_name = employee.nil? ? sh_name : "#{sh_name} (#{employee.name})"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user