On Thursday, July 12, 2012 12:39:50 PM UTC-7, Matt Hauck wrote:
>
> Sweet, thanks! (any chance I might see a sneak preview?)
>
>
diff --git a/lib/sequel/adapters/jdbc.rb b/lib/sequel/adapters/jdbc.rb
index 61a7119..b01da5b 100644
--- a/lib/sequel/adapters/jdbc.rb
+++ b/lib/sequel/adapters/jdbc.rb
@@ -431,7 +431,8 @@ module Sequel
       # Support fractional seconds for Time objects used in bound variables
       def java_sql_timestamp(time)
         ts = java.sql.Timestamp.new(time.to_i * 1000)
-        ts.setNanos(RUBY_VERSION >= '1.9.0' ? time.nsec : time.usec * 1000)
+        # Work around jruby 1.6 ruby 1.9 mode bug
+        ts.setNanos((RUBY_VERSION >= '1.9.0' && time.nsec != 0) ? 
time.nsec : time.usec * 1000)
         ts
       end

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sequel-talk/-/_8T4NCaETk4J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to