Class: Fog::Time
- Inherits:
-
Time
- Object
- Time
- Fog::Time
- Defined in:
- lib/rackspace-fog/core/time.rb
Constant Summary collapse
- DAYS =
['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
- MONTHS =
['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.now ⇒ Object
7 8 9 |
# File 'lib/rackspace-fog/core/time.rb', line 7 def self.now at((::Time.now - offset).to_i) end |
.now=(new_now) ⇒ Object
11 12 13 14 15 |
# File 'lib/rackspace-fog/core/time.rb', line 11 def self.now=(new_now) old_now = ::Time.now @offset = old_now - new_now new_now end |
.offset ⇒ Object
17 18 19 |
# File 'lib/rackspace-fog/core/time.rb', line 17 def self.offset @offset ||= 0 end |