Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #11619 (new defect)

Opened 2 weeks ago

Ruby crash with SQL Server and timestamps < 12/30/1899

Reported by: calrsom Assigned to: core
Priority: normal Milestone: 2.x
Component: ActiveRecord Version: edge
Severity: major Keywords: SQL Server date timestamp 1899
Cc:

Description

Ruby crashes with no exceptions or errors when Rails attempts to retrieve a record which has a timestamp field with a value before 12/30/1899.

Example code: Project.find(86036)

(All it takes is a simple find on the right record, and... where's my web server?)

We have this issue with a legacy database also being used with Microsoft Access. The data is actually incorrect, but severity of the bug is a problem.

Environment: Microsoft SQL Server 2005 sqlserver_adapter in ADO mode Ruby 1.8.6 (one-click installer) Rails 2.0.2 (is this edge?) Mongrel 1.1.2 RadRails 1.0.1 Windows XP SP2