1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

use Time.now.utc instead of Time.now, closes #1421

This commit is contained in:
Vasiliy Ermolovich 2011-11-09 23:25:48 +03:00
parent 16208f7ad7
commit 7e9ba53d82
3 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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