Ensure both times are UTC when validating the confirmation period
The fact that we're setting them value as UTC doesn't necessarily mean we're gonna get it back as UTC, so ensure both are converted to compare.
This commit is contained in:
parent
a665aada25
commit
bacd9d244c
|
@ -225,7 +225,7 @@ module Devise
|
|||
# confirmation_period_expired? # will always return false
|
||||
#
|
||||
def confirmation_period_expired?
|
||||
self.class.confirm_within && self.confirmation_sent_at && (Time.now.utc > self.confirmation_sent_at + self.class.confirm_within)
|
||||
self.class.confirm_within && self.confirmation_sent_at && (Time.now.utc > self.confirmation_sent_at.utc + self.class.confirm_within)
|
||||
end
|
||||
|
||||
# Checks whether the record requires any confirmation.
|
||||
|
|
Loading…
Reference in New Issue