Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix ODBC adapter's conversion of ::ODBC::Time values

  • Loading branch information...
commit bfd00c07458697d28af8d1d34ae962892a5a84dd 1 parent f8aa8a3
@jeremyevans authored
Showing with 3 additions and 1 deletion.
  1. +2 −0  CHANGELOG
  2. +1 −1  lib/sequel_core/adapters/odbc.rb
View
2  CHANGELOG
@@ -1,5 +1,7 @@
=== HEAD
+* Fix ODBC adapter's conversion of ::ODBC::Time values (Michael Xavier)
+
* Enable full support for SQLite-JDBC using the JDBC adapter (jeremyevans)
* Minor changes to allow for full Ruby 1.9 compatibility (jeremyevans)
View
2  lib/sequel_core/adapters/odbc.rb
@@ -142,7 +142,7 @@ def convert_odbc_value(v)
when ::ODBC::TimeStamp
DateTime.new(v.year, v.month, v.day, v.hour, v.minute, v.second)
when ::ODBC::Time
- DateTime.now
+ now = DateTime.now
Time.gm(now.year, now.month, now.day, v.hour, v.minute, v.second)
when ::ODBC::Date
Date.new(v.year, v.month, v.day)
Please sign in to comment.
Something went wrong with that request. Please try again.