Preserve timezone when calling to_time

Quoting the Rails DateAndTime::Compatibility module:

> With Ruby 2.4+ the default for +to_time+ changed from
> converting to the local system time, to preserving the offset
> of the receiver. For backwards compatibility we're overriding
> this behavior

We don't need backwards compatibility in our application because we
aren't converting any time objects to the local system timezone but use
the application timezone all the time instead.
This commit is contained in:
Javi Martín
2020-09-04 16:50:43 +02:00
parent f1b38d20c1
commit 0734e788bd

View File

@@ -11,7 +11,6 @@ module Consul
config.load_defaults 5.0
# Overwrite Rails 5.0 defaults and use the options we used in Rails 4
ActiveSupport.to_time_preserves_timezone = false
config.active_record.belongs_to_required_by_default = false
config.ssl_options = {}