1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/core/time.rb
geemus 74e4288549 add offset for fog times
allows working around clock skew issues
2010-12-21 12:12:30 -08:00

21 lines
No EOL
288 B
Ruby

module Fog
class Time < ::Time
class << self
def now
::Time.now - offset
end
def now=(new_now)
old_now = ::Time.now
@offset = old_now - new_now
new_now
end
def offset
@offset ||= 0
end
end
end
end