class Fog::Time

Constants

DAYS
MONTHS

Public Class Methods

now() click to toggle source
# File lib/fog/core/time.rb, line 8
def self.now
  at(::Time.now - offset)
end
now=(new_now) click to toggle source
# File lib/fog/core/time.rb, line 12
def self.now=(new_now)
  old_now = ::Time.now
  @offset = old_now - new_now
  new_now
end
offset() click to toggle source
# File lib/fog/core/time.rb, line 18
def self.offset
  @offset ||= 0
end

Public Instance Methods

to_date_header() click to toggle source
# File lib/fog/core/time.rb, line 22
def to_date_header
  utc.strftime("#{DAYS[utc.wday]}, %d #{MONTHS[utc.month - 1]} %Y %H:%M:%S +0000")
end
to_iso8601_basic() click to toggle source
# File lib/fog/core/time.rb, line 26
def to_iso8601_basic
  utc.strftime("%Y%m%dT%H%M%SZ")
end