fix timezone - time with local timezone to default timezone
This commit is contained in:
@@ -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 ""
|
||||
|
||||
@@ -70,13 +70,13 @@
|
||||
from_date = @from.strftime("%d-%m-%Y")
|
||||
from_time = @from.strftime("%H:%M") if @from.strftime("%H:%M") != "00:00"
|
||||
else
|
||||
from_date = Time.now.strftime('%d-%m-%Y')
|
||||
from_date = Time.current.strftime('%d-%m-%Y')
|
||||
end
|
||||
if !@to.nil? && @to != ""
|
||||
to_date = @to.strftime("%d-%m-%Y")
|
||||
to_time = @to.strftime("%H:%M") if @to.strftime("%H:%M") != "23:59"
|
||||
else
|
||||
to_date = Time.now.strftime('%d-%m-%Y')
|
||||
to_date = Time.current.strftime('%d-%m-%Y')
|
||||
end
|
||||
%>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3 col-mbl-view mbl-style">
|
||||
|
||||
@@ -477,7 +477,7 @@
|
||||
<!-- Footer -->
|
||||
<div class="legal">
|
||||
<div class="copyright">
|
||||
© <%= Time.now.strftime("%Y") %> <a href="javascript:void(0);">Code2Lab</a>.
|
||||
© <%= Time.current.strftime("%Y") %> <a href="javascript:void(0);">Code2Lab</a>.
|
||||
</div>
|
||||
<div class="version">
|
||||
<b>Version: </b> 1.0.1
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<%= qsi.station_name %>
|
||||
<% if @filter.nil? %>
|
||||
<span class="badge bg-blue-grey oqs_count<%= i%> oqs_count" data-id="<%= qsi.id %>" id="completed_count">
|
||||
<!-- <span class="badge badge-pill badge-default oqs_count<%= i%> oqs_count" data-id="<%= qsi.id %>"> --> <%= qsi.assigned_order_items.where("delivery_status=0 AND created_at >= '#{Time.now.beginning_of_day.utc}'").count %>
|
||||
<!-- <span class="badge badge-pill badge-default oqs_count<%= i%> oqs_count" data-id="<%= qsi.id %>"> --> <%= qsi.assigned_order_items.where("delivery_status=0 AND created_at >= '#{Time.current.beginning_of_day.utc}'").count %>
|
||||
</span>
|
||||
<%else%>
|
||||
<span class="label-count badge bg-blue-grey" data-id="<%= qsi.id %>">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<% renewable_date = current_license.read_license("renewable_date") %>
|
||||
<% date_count = (renewable_date.to_date - Date.today).to_i %>
|
||||
<% date_count = (renewable_date.to_date - Date.current).to_i %>
|
||||
<% day = pluralize( date_count, 'day' )%>
|
||||
|
||||
<% if @license_status == 0 %>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<% license_status = current_license.detail_with_local_file %>
|
||||
<% renewable_date = current_license.read_license("renewable_date") %>
|
||||
<% date_count = (renewable_date.to_date - Date.today).to_i %>
|
||||
<% date_count = (renewable_date.to_date - Date.current).to_i %>
|
||||
<% day = pluralize( date_count, 'day' )%>
|
||||
|
||||
<% if license_status == 0
|
||||
|
||||
Reference in New Issue
Block a user