Skip to content

Commit 27b3590

Browse files
committed
Update in_sql.rb
Fixes issue #43 Signed-off-by: Johan Sjölin <[email protected]>
1 parent 8c3c593 commit 27b3590

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/fluent/plugin/in_sql.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,9 @@ def start
192192
socket: @socket,
193193
schema_search_path: @schema_search_path,
194194
}
195-
195+
# This makes the default timezone the local one if it's undefined in the timestamp field itself
196+
ActiveRecord::Base.default_timezone = :local
197+
196198
# creates subclass of ActiveRecord::Base so that it can have different
197199
# database configuration from ActiveRecord::Base.
198200
@base_model = Class.new(ActiveRecord::Base) do

0 commit comments

Comments
 (0)