Defect #43231
closed
DEPRECATION WARNING: `to_time` will always preserve the receiver timezone rather than system local time in Rails 8.1
Added by Marius BĂLTEANU 9 months ago.
Updated 17 days ago.
Description
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`. (called from time_tag at /work/app/helpers/application_helper.rb:754)
- Status changed from New to Closed
- Assignee set to Marius BĂLTEANU
- Resolution set to Fixed
- Status changed from Closed to Reopened
The setting introduced in r24052 as part of the Rails 8.0 migration now triggers the following deprecation warning with Rails 8.1:
DEPRECATION WARNING: `config.active_support.to_time_preserves_timezone` is deprecated and will be removed in Rails 8.2
The warning can be fixed by removing the setting added in r24052.
diff --git a/config/application.rb b/config/application.rb
index 96b8ad3f4..51c479b89 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -32,7 +32,6 @@ module RedmineApp
config.active_support.remove_deprecated_time_with_zone_name = true
config.active_support.cache_format_version = 7.0
- config.active_support.to_time_preserves_timezone = :zone
config.active_record.store_full_sti_class = true
config.active_record.default_timezone = :local
- Status changed from Reopened to Closed
Also available in: Atom
PDF