From 3cf7e4a71a54c9456dc34fb95f4939f2aff65aeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 9 Jan 2025 17:34:34 +0100 Subject: [PATCH] Fix ActiveSupport warning > DEPRECATION WARNING: `to_time` will always preserve the receiver timezone rather than system local time in Rails 8.1.To opt in to the new behavior, set `config.active_support.to_time_preserves_timezone = :zone`. --- lib/middleman-blog/extension.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/middleman-blog/extension.rb b/lib/middleman-blog/extension.rb index 0fc6daa..982baec 100644 --- a/lib/middleman-blog/extension.rb +++ b/lib/middleman-blog/extension.rb @@ -115,6 +115,8 @@ def after_configuration @app.ignore(options.day_template) if options.day_template @app.ignore options.tag_template if options.tag_template + ActiveSupport.to_time_preserves_timezone = :zone + # Make sure ActiveSupport's TimeZone stuff has something to work with, # allowing people to set their desired time zone via Time.zone or # set :time_zone