Class: ScoutApm::Utils::Time
- Inherits:
-
Object
- Object
- ScoutApm::Utils::Time
- Defined in:
- lib/scout_apm/utils/time.rb
Class Method Summary collapse
-
.to_s(time) ⇒ Object
Handles both integer (unix) time and Time objects example output: “09/10/15 04:34:28 -0600”.
Class Method Details
.to_s(time) ⇒ Object
Handles both integer (unix) time and Time objects example output: “09/10/15 04:34:28 -0600”
6 7 8 9 |
# 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 |