From a41ffb1955329fa0f0f12f23404c32879e72689a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Svenja=20Sch=C3=A4fer?= <19774772+slickepinne@users.noreply.github.com> Date: Wed, 29 Jan 2025 13:34:29 +0100 Subject: [PATCH] Fix deprecation warning regarding to_time (#2753) We had a deprecation warning: to_time will always preserve the receive timezone rather than system local time in Rails 8.1 which gets fixed by setting "to_time_preserves_timezone" to "zone" in the application configuration. --- spec/example_app/config/application.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/example_app/config/application.rb b/spec/example_app/config/application.rb index 22cd4755f..c909948f5 100644 --- a/spec/example_app/config/application.rb +++ b/spec/example_app/config/application.rb @@ -28,6 +28,7 @@ class Application < Rails::Application config.action_controller.action_on_unpermitted_parameters = :raise config.active_record.time_zone_aware_types = %i[datetime time] + config.active_support.to_time_preserves_timezone = :zone # Opt-out of FLoC: https://amifloced.org/ config.action_dispatch