Oracle date, i get 0007 instead of 2007

I’m running Oracle and in my table i have a field:
SCHEDULED_DATE of type DATE.

When I do a query model = MyModel.find(1)
model.scheduled_date_before_type_case ends up being equal to
‘0007-09-19’ instead of ‘2007-09-19’.

In the oracle adapter I ran a debug accross all the fields and got, just
after it does the query and gets the results.

  • 0001017408770802
  • 0001017408
  • “770802”
  • !ruby/object:OraDate 0007/09/19 00:00:00
  • !ruby/object:OraDate 0007/09/19 00:00:00
  • N
  • !ruby/object:OraDate 0007/09/19 00:00:00
  • RM

Any ideas?

Any hints at how I could debug this would really be appreciated?

In my opinion Rails does some weird parsing of strings into dates. I
wrote a
plugin that changes how dates are parsed that makes it much more sane,
at
least in my opinion.

http://svn.viney.net.nz/things/rails/plugins/validates_date_time

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs