lib/semantic_logger/log.rb in semantic_logger-4.13.0 vs lib/semantic_logger/log.rb in semantic_logger-4.14.0
- old
+ new
@@ -217,14 +217,14 @@
def duration_human
return nil unless duration
seconds = duration / 1000
if seconds >= 86_400.0 # 1 day
- "#{(seconds / 86_400).to_i}d #{Time.at(seconds).strftime('%-Hh %-Mm')}"
+ "#{(seconds / 86_400).to_i}d #{Time.at(seconds).utc.strftime('%-Hh %-Mm')}"
elsif seconds >= 3600.0 # 1 hour
- Time.at(seconds).strftime("%-Hh %-Mm")
+ Time.at(seconds).utc.strftime("%-Hh %-Mm")
elsif seconds >= 60.0 # 1 minute
- Time.at(seconds).strftime("%-Mm %-Ss")
+ Time.at(seconds).utc.strftime("%-Mm %-Ss")
elsif seconds >= 1.0 # 1 second
"#{format('%.3f', seconds)}s"
else
duration_to_s
end