Skip to content

Commit c1a2587

Browse files
committed
Use to_i instead of sec
1 parent f1e73be commit c1a2587

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/fluent/logger/fluent_logger.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ def initialize(raw_time)
3131
end
3232

3333
def to_msgpack(io = nil)
34-
@time.sec.to_msgpack(io)
34+
@time.to_i.to_msgpack(io)
3535
end
3636

3737
def to_msgpack_ext
38-
[@time.sec, @time.nsec].pack('NN')
38+
[@time.to_i, @time.nsec].pack('NN')
3939
end
4040

4141
def self.from_msgpack_ext(data)
4242
new(*data.unpack('NN'))
4343
end
4444

4545
def to_json(*args)
46-
@time.sec
46+
@time.to_i
4747
end
4848
end
4949

0 commit comments

Comments
 (0)