Skip to content

Commit 61f9c2a

Browse files
Pierrick Rouxelkares
authored andcommitted
remove date from time type
1 parent d85f36c commit 61f9c2a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/arjdbc/db2/adapter.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,13 @@ def quote(value, column = nil) # :nodoc:
361361
"'#{quote_string(value)}'"
362362
end
363363
when Symbol then "'#{quote_string(value.to_s)}'"
364+
when Time
365+
# AS400 doesn't support date in time column
366+
if column && column_type == :time
367+
"'#{value.strftime("%H:%M:%S")}'"
368+
else
369+
super
370+
end
364371
else super
365372
end
366373
end

0 commit comments

Comments
 (0)