Class: Fog::Time

Inherits:
Time
  • Object
show all
Defined in:
lib/fog/core/time.rb

Class Method Summary collapse

Class Method Details

.nowObject



5
6
7
# File 'lib/fog/core/time.rb', line 5

def now
  ::Time.now - offset
end

.now=(new_now) ⇒ Object



9
10
11
12
13
# File 'lib/fog/core/time.rb', line 9

def now=(new_now)
  old_now = ::Time.now
  @offset = old_now - new_now
  new_now
end

.offsetObject



15
16
17
# File 'lib/fog/core/time.rb', line 15

def offset
  @offset ||= 0
end