Skip to content

Commit

Permalink
Fix ActiveSupport warning
Browse files Browse the repository at this point in the history
> 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`.
  • Loading branch information
deivid-rodriguez committed Jan 9, 2025
1 parent 50414a9 commit 0caf9a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/middleman-blog/extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0caf9a4

Please sign in to comment.