Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Bug in DBI::ODBC: DateTime treated as Date
David Bennett
1/10/2009 12:35:00 PM
Using DBI::ODBC and it works nicely thank you.
Inserting a value into a column of type SQL datetime.
If the value is ruby type DateTime, it gets truncated to a Date on
insert. The time portion is lost.
eg 2009-10-01T21:37:14 => 2009-10-01 00:00:00.
I think the bug may be in function register_conversion around line 69 in
odbc.rb. In the case statement, since DateTime is a subclass of Date,
the Date branch is taken instead of the DateTime branch.
The fix may be as simple as re-ordering the case branches.
Anyone familiar with the code willing to comment? I'm new to ruby, so
I'd appreciate it.
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Bug in DBI::ODBC: DateTime treated as Date
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password