Fix Time.now deprecation warning

This commit is contained in:
Brian J. Cardiff 2019-06-04 16:59:05 -03:00
parent ec87dfb614
commit 79cd8bd646

View file

@ -7,7 +7,7 @@ module Kemal
def call(context : HTTP::Server::Context)
elapsed_time = Time.measure { call_next(context) }
elapsed_text = elapsed_text(elapsed_time)
@io << Time.now << ' ' << context.response.status_code << ' ' << context.request.method << ' ' << context.request.resource << ' ' << elapsed_text << '\n'
@io << Time.utc << ' ' << context.response.status_code << ' ' << context.request.method << ' ' << context.request.resource << ' ' << elapsed_text << '\n'
context
end