Skip to content

Commit

Permalink
Set timezone config explicitly
Browse files Browse the repository at this point in the history
To disable the following warning:
```
DEPRECATION WARNING: `to_time` will always preserve the receiver timezone rather than system local time in Rails 8.0. To opt in to the new behavior, set `config.active_support.to_time_preserves_timezone = :zone`. (called from <top (required)> at /Users/ryunosuke.sato/src/github.com/thoughtbot/ember-cli-rails/spec/spec_helper.rb:9)
```
  • Loading branch information
tricknotes authored and seanpdoyle committed Aug 20, 2024
1 parent 75b4f7d commit 2af2b14
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/dummy/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class Application < Rails::Application
config.secret_token = "SECRET_TOKEN_IS_MIN_30_CHARS_LONG"
config.secret_key_base = "SECRET_KEY_BASE"

config.active_support.to_time_preserves_timezone = :zone

def require_environment!
initialize!
end
Expand Down

0 comments on commit 2af2b14

Please sign in to comment.