use Time.now.utc instead of Time.now, closes #1421
This commit is contained in:
parent
16208f7ad7
commit
7e9ba53d82
|
@ -34,7 +34,7 @@ module Devise
|
|||
def confirm!
|
||||
unless_confirmed do
|
||||
self.confirmation_token = nil
|
||||
self.confirmed_at = Time.now
|
||||
self.confirmed_at = Time.now.utc
|
||||
save(:validate => false)
|
||||
end
|
||||
end
|
||||
|
@ -71,7 +71,7 @@ module Devise
|
|||
# If you don't want confirmation to be sent on create, neither a code
|
||||
# to be generated, call skip_confirmation!
|
||||
def skip_confirmation!
|
||||
self.confirmed_at = Time.now
|
||||
self.confirmed_at = Time.now.utc
|
||||
end
|
||||
|
||||
protected
|
||||
|
|
|
@ -24,7 +24,7 @@ module Devise
|
|||
|
||||
# Lock a user setting its locked_at to actual time.
|
||||
def lock_access!
|
||||
self.locked_at = Time.now
|
||||
self.locked_at = Time.now.utc
|
||||
|
||||
if unlock_strategy_enabled?(:email)
|
||||
generate_unlock_token
|
||||
|
|
|
@ -12,7 +12,7 @@ module Devise
|
|||
#
|
||||
module Trackable
|
||||
def update_tracked_fields!(request)
|
||||
old_current, new_current = self.current_sign_in_at, Time.now
|
||||
old_current, new_current = self.current_sign_in_at, Time.now.utc
|
||||
self.last_sign_in_at = old_current || new_current
|
||||
self.current_sign_in_at = new_current
|
||||
|
||||
|
|
Loading…
Reference in New Issue