Class: Pupmin::Util
- Inherits:
-
Object
- Object
- Pupmin::Util
- Defined in:
- lib/pupmin/util.rb
Overview
Utilities/helpers for various things
Class Method Summary collapse
-
.make_timestamp(offset = 0) ⇒ Object
PuppetDB seems to use a timestamp that isn’t quite standard, so this takes an offset, and creates the time used in reports.
Class Method Details
.make_timestamp(offset = 0) ⇒ Object
PuppetDB seems to use a timestamp that isn’t quite standard, so this
takes an offset, and creates the time used in reports
6 7 8 9 10 |
# File 'lib/pupmin/util.rb', line 6 def self.(offset = 0) current_time = Time.new.utc adjusted_time = current_time - offset adjusted_time.strftime('%FT%TZ') end |