What is the difference between:
cookies[:login] = { :value => "XJ-122", :expires => 1.hour.from_now }
and
cookies[:login] = { :value => "XJ-122", :expires => 1.hour }
Aren’t both times calculated at the time the cookie is set, and therefore ‘from_now’ is irrelevant?
You can always check your understanding using “rails console”.
ActiveSupport::TimeWithZone is a ‘glorified’ Time class.
:expires needs a Time instance. So, you should use 1.hour.from_now