fix timezone - time with local timezone to default timezone

This commit is contained in:
pyaephyoeaung
2022-05-19 14:20:55 +06:30
parent 7598a96e60
commit 214712fd2d
48 changed files with 294 additions and 305 deletions

View File

@@ -13,8 +13,8 @@ if @zones
json.zone_id table.zone_id #Add this zone_id to keep data structure consistance
if !current_booking.nil?
json.current_booking current_booking.booking_id
json.checkin_at Time.parse(current_booking.checkin_at.strftime("%Y-%m-%d %H:%M:%S")).strftime("%Y-%m-%d %H:%M:%S")
json.checkout_at current_booking.checkout_at ? Time.parse(current_booking.checkout_at.strftime("%Y-%m-%d %H:%M:%S")).strftime("%Y-%m-%d %H:%M:%S") : ""
json.checkin_at current_booking.checkin_at.strftime("%Y-%m-%d %H:%M:%S")
json.checkout_at current_booking.checkout_at ? current_booking.checkout_at.strftime("%Y-%m-%d %H:%M:%S") : ""
else
json.current_booking ""
json.checkin_at ""
@@ -32,8 +32,8 @@ if @zones
json.zone_id room.zone_id #Add this zone_id to keep data structure consistance
if !current_booking.nil?
json.current_booking current_booking.booking_id
json.checkin_at Time.parse(current_booking.checkin_at.strftime("%Y-%m-%d %H:%M:%S")).strftime("%Y-%m-%d %H:%M:%S")
json.checkout_at current_booking.checkout_at ? Time.parse(current_booking.checkout_at.strftime("%Y-%m-%d %H:%M:%S")).strftime("%Y-%m-%d %H:%M:%S") : ""
json.checkin_at current_booking.checkin_at.strftime("%Y-%m-%d %H:%M:%S")
json.checkout_at current_booking.checkout_at ? current_booking.checkout_at.strftime("%Y-%m-%d %H:%M:%S") : ""
else
json.current_booking ""
json.checkin_at ""
@@ -53,8 +53,8 @@ else #list all tables and rooms with out zones
json.zone_id table.zone_id #Add this zone_id to keep data structure consistance
if !current_booking.nil?
json.current_booking current_booking.booking_id
json.checkin_at Time.parse(current_booking.checkin_at.strftime("%Y-%m-%d %H:%M:%S")).strftime("%Y-%m-%d %H:%M:%S")
json.checkout_at current_booking.checkout_at ? Time.parse(current_booking.checkout_at.strftime("%Y-%m-%d %H:%M:%S")).strftime("%Y-%m-%d %H:%M:%S") : ""
json.checkin_at current_booking.checkin_at.strftime("%Y-%m-%d %H:%M:%S")
json.checkout_at current_booking.checkout_at ? current_booking.checkout_at.strftime("%Y-%m-%d %H:%M:%S") : ""
else
json.current_booking ""
json.checkin_at ""
@@ -72,8 +72,8 @@ else #list all tables and rooms with out zones
json.zone_id room.zone_id #Add this zone_id to keep data structure consistance
if !current_booking.nil?
json.current_booking current_booking.booking_id
json.checkin_at Time.parse(current_booking.checkin_at.strftime("%Y-%m-%d %H:%M:%S")).strftime("%Y-%m-%d %H:%M:%S")
json.checkout_at current_booking.checkout_at ? Time.parse(current_booking.checkout_at.strftime("%Y-%m-%d %H:%M:%S")).strftime("%Y-%m-%d %H:%M:%S") : ""
json.checkin_at current_booking.checkin_at.strftime("%Y-%m-%d %H:%M:%S")
json.checkout_at current_booking.checkout_at ? current_booking.checkout_at.strftime("%Y-%m-%d %H:%M:%S") : ""
else
json.current_booking ""
json.checkin_at ""