On May 30, 5:20 pm, Eric LIn
<ericlin...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I have datetime (SQL) column in my DB, and I noticed whenever I
> retrieve that column using ActiveRecord, it returns an object of class
> Time instead of DateTime. Does Rails convert treat datetime and time
> as if they''re the same?
>
Time and DateTime are not the same, but the behave mostly the same
(and Time is what you get by default for a datetime column).
Ruby''s Time and DateTime are not different in the way that a
database''s time and datetime are (ruby does not have a pure time of
day class).
Fred
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---