1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Merge pull request #2514 from fcheung/request_spot_instances_time_coercion

[AWS|EC2] request_spot_instances.rb requires that date parameters be iso...
This commit is contained in:
Frederick Cheung 2013-12-27 15:26:24 -08:00
commit 29b789dc9a

View file

@ -75,6 +75,14 @@ module Fog
options['LaunchSpecification.UserData'] = Base64.encode64(options['LaunchSpecification.UserData'])
end
if options['ValidFrom'] && options['ValidFrom'].is_a?(Time)
options['ValidFrom'] = options['ValidFrom'].iso8601
end
if options['ValidUntil'] && options['ValidUntil'].is_a?(Time)
options['ValidUntil'] = options['ValidUntil'].iso8601
end
request({
'Action' => 'RequestSpotInstances',
'LaunchSpecification.ImageId' => image_id,