From fa9c06d714b10d0942aef33e9753d98159774b67 Mon Sep 17 00:00:00 2001 From: Decklin Foster Date: Thu, 1 Mar 2012 12:54:04 -0500 Subject: [PATCH] [ibm] launched_at convenience method --- lib/fog/ibm/models/compute/server.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/fog/ibm/models/compute/server.rb b/lib/fog/ibm/models/compute/server.rb index 49b2b3876..cca048920 100644 --- a/lib/fog/ibm/models/compute/server.rb +++ b/lib/fog/ibm/models/compute/server.rb @@ -132,6 +132,10 @@ module Fog data.body end + def launched_at + Time.at(attributes[:launched_at].to_f / 1000) + end + def expires_at Time.at(attributes[:expires_at].to_f / 1000) end