Skip to content

Commit 8503e46

Browse files
authored
Merge pull request #45 from phongtattuan/master
Fixed timestamp attribute serialization
2 parents 7f7a483 + e423804 commit 8503e46

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/fluent/plugin/in_sql.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ def read_attribute_for_serialization(n)
9292
v = send(n)
9393
if v.respond_to?(:to_msgpack)
9494
v
95+
elsif v.is_a? Time
96+
v.strftime('%Y-%m-%d %H:%M:%S.%6N%z')
9597
else
9698
v.to_s
9799
end

0 commit comments

Comments
 (0)