Class: Time
- Inherits:
-
Object
- Object
- Time
- Defined in:
- lib/rbvmomi/vim/PerformanceManager.rb
Instance Method Summary collapse
Instance Method Details
#to_datetime ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/rbvmomi/vim/PerformanceManager.rb', line 8 def to_datetime # Convert seconds + microseconds into a fractional number of seconds seconds = sec + Rational(usec, 10**6) # Convert a UTC offset measured in minutes to one measured in a # fraction of a day. offset = Rational(utc_offset, 60 * 60 * 24) DateTime.new(year, month, day, hour, min, seconds, offset) end |