> Any help would be greatly appreciated.
> 
> Thanks,
> Carlos

I am sure this is bad, evil, probably wrong as hell thing to to but:

I am using a simple simple program that suffers from this problem. I 
only wanted the Date values, I didn't care about the time value as it 
was always 00:00.

I cannot change the table structure and I am not actively using the 
value (I am going from oracle to a RoR view with <%= class.date %>, no 
processing)

I browsed around for ages and found someone talking about messing with 
the oci8.rb file OraDate function.

I changed

class OraDate
  def to_time
    begin
      Time.local(year, month, day, hour, minute, second)
    rescue ArgumentError
      msg = format("out of range of Time (expect between 1970-01-01 
00:00:00 UTC and 2037-12-31 23:59:59, but %04d-%02d-%02d %02d:%02d:%02d 
%s)", year, month, day, hour, minute, second, Time.at(0).zone)
      raise RangeError.new(msg)
    end
  end


To

class OraDate
  def to_time
    begin
      Time.local(year, month, day, hour, minute, second)
    rescue ArgumentError
      Date.new(year, month, day)
    end
  end


So I guess I am in essence saying "If to_time fails, use to_date"...

It worked for me in a trivial application and I am sure I have condemned 
myself to hell for using it so be careful. I have no idea what hte 
ramifications are and how it would cope in a more complex program.

It might cost you your soul ;)

Jeff

-- 
Posted via http://www.ruby-forum.com/.