Class: Time
Overview
Time extensions
Class Method Summary collapse
-
.pack ⇒ String
Shorthand for Time.now.pack.
-
.stamp ⇒ String
Shorthand for Time.now.stamp.
Instance Method Summary collapse
-
#pack ⇒ String
The time is converted to UTC.
-
#stamp ⇒ String
This standard format is specified in IETF RFC 3339 and ISO 8601.
Class Method Details
.pack ⇒ String
Shorthand for Time.now.pack
57 58 59 |
# File 'lib/sixarm_ruby_ramp/time.rb', line 57 def self.pack now.pack end |
.stamp ⇒ String
Shorthand for Time.now.stamp
31 32 33 |
# File 'lib/sixarm_ruby_ramp/time.rb', line 31 def self.stamp now.stamp end |
Instance Method Details
#pack ⇒ String
The time is converted to UTC.
44 45 46 |
# File 'lib/sixarm_ruby_ramp/time.rb', line 44 def pack getutc.strftime('%Y%m%d%H%M%S') end |
#stamp ⇒ String
This standard format is specified in IETF RFC 3339 and ISO 8601.
18 19 20 |
# File 'lib/sixarm_ruby_ramp/time.rb', line 18 def stamp getutc.strftime('%Y-%m-%d %H:%M:%SZ') end |