When using dates in Rails with SQL server everything seems to work
great until I attempt to use a date prior to 1970. I can see the date
is correct in the database but when I attempt to read the value it is
returned as nil, if I ask for it again I get the correct date.
I can write dates prior to 1970 into the database however I think is
facilitated by validates_date plugin which seems to work a charm.
Without the plugin I think I would get errors.
If in my controller I ask for the date to be formated as string and
just rescue the failure as it always fails first time, then the date
works from then on, but I would really like to get this fixed so I
dont have to perform this little dance every time I use a date field.
I have found a bug report http://dev.rubyonrails.org/ticket/3430 which
was opened around 2 years ago and there are a couple of suggestions
but none seem to work for me.
Does anyone have any suggestions?