class ScoutApm::Utils::Time

Public Class Methods

to_s(time) click to toggle source

Handles both integer (unix) time and Time objects example output: “09/10/15 04:34:28 -0600”

# File lib/scout_apm/utils/time.rb, line 6
def self.to_s(time)
  return to_s(::Time.at(time)) if time.is_a? Integer
  time.strftime("%m/%d/%y %H:%M:%S %z")
end