The following two snippets are apparenly not equivalent in an ActiveRecord
model:
1.
expires_at = 90.days.from_now
self.remember_token_expires_at = expires_at.localtime
2.
self.remember_token_expires_at = 90.days.from_now.localtime
Time.now is stubbed to return Time.parse(''Jan 1, 2001''). My
system runs on
Eastern time. With snippet #1, I see:
UPDATE hark_users SET ... "remember_token_expires_at" =
''2001-04-01
05:00:00.000000'', ...
With snippet #2:
UPDATE hark_users SET ... "remember_token_expires_at" =
''2001-04-01
00:00:00.000000'', ...
I am utterly mystified as to how these two snippets are not identical.
Anyone have any ideas?
Jay Levitt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---