Skip to content

Commit f02c962

Browse files
Fix ActiveSupport warning (#390)
> 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`.
1 parent 01a485f commit f02c962

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/middleman-blog/extension.rb

+2
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ def after_configuration
115115
@app.ignore(options.day_template) if options.day_template
116116
@app.ignore options.tag_template if options.tag_template
117117

118+
ActiveSupport.to_time_preserves_timezone = :zone
119+
118120
# Make sure ActiveSupport's TimeZone stuff has something to work with,
119121
# allowing people to set their desired time zone via Time.zone or
120122
# set :time_zone

0 commit comments

Comments
 (0)