class Time

Time extensions

Public Class Methods

pack() click to toggle source

Shorthand for Time.now.pack

@example

Time.pack
=> "20101231125959"

@return [String] Time.now.pack

# File lib/sixarm_ruby_ramp/time.rb, line 27
def self.pack
  now.pack
end

Public Instance Methods

pack() click to toggle source

@return [String] time packed into a short string: “YYYYMMDDHHMMSS”

The time is converted to UTC.

@example

Time.now.pack
=> "20101231125959"
# File lib/sixarm_ruby_ramp/time.rb, line 14
def pack
  getutc.strftime('%Y%m%d%H%M%S')
end