module JsonbAccessor::Helpers

def deserialize_value(value, attribute_type)

def deserialize_value(value, attribute_type)
  return value if value.blank?
  if attribute_type == :datetime
    value = if active_record_default_timezone == :utc
              Time.find_zone("UTC").parse(value).in_time_zone
            else
              Time.zone.parse(value)
            end
  end
  value
end