-
Notifications
You must be signed in to change notification settings - Fork 37
Closed
Description
Hi,
I am implementing reservation management now and I just noticed some weird behaviour when datatable is showing DateTime fields. The time (hours) part is showing correctly when the table is first initialised, but then when a filter is used the table actually shows times as if the timezone was UTC.
Which makes total sense since the Datatable Filter part is handled from a controller in EffectiveDatatable.
In my controllers this bit sets the Time.zone for the current account:
class ApplicationController < ActionController::Base
around_action :set_time_zone, if: :current_account
def set_time_zone
Time.use_zone(current_account.time_zone) do
yield
end
end
end
But that won't effect EffectiveDatatable::DatatablesController.
I was wondering how do you handle different time zones when using EffectiveDatatable.
Thanks
Metadata
Metadata
Assignees
Labels
No labels