On 6/5/06, Michael A. Schoen <[EMAIL PROTECTED]> wrote:
Blair Zajac wrote:
> Do you have any URLs describing why we have to assume a datetime in Oracle?
It's because Oracle doesn't have a date-only field type, DATE is
actually a datetime. The original author made an attempt to be smart
about whether you'd get back a Ruby Date or Time object, but I'm not
convinced it's possible to be that smart. Or that it makes enough of a
difference to even try.
>> Why not just use Time, everywhere. It nearly duck-types for Date anyway.
>
> I think that's a good idea.
>
> If we do this, then the above patch is a short term workaround, correct?
Sort of. I'd still suggest the patch itself makes sense, since it keeps
Ruby Date and Time duck-typing nicely. And the patch to the test will
still be necessary (since it recognizes that Oracle's going to treat
that column as a datetime, along w/ the Sybase and SqlServer adapters).
If the Oracle adapter is going to assume a particular type for DATE
fields (and I think it should, for sure), shouldn't it default to one
that can handle the full range of dates that the Oracle DATE type can
represent?
I know I've seen Rails apps that store dates prior to 1970, and there
will likely be many more in the future.
--Wilson.
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core