lib/fb_graph/event.rb in fb_graph-0.0.7 vs lib/fb_graph/event.rb in fb_graph-0.0.8
- old
+ new
@@ -15,16 +15,22 @@
if (owner = options[:owner])
@owner = FbGraph::User.new(owner.delete(:id), owner)
end
@name = options[:name]
@description = options[:description]
- @start_time = options[:start_time]
- @end_time = options[:end_time]
+ if options[:start_time]
+ @start_time = Time.parse(options[:start_time])
+ end
+ if options[:end_time]
+ @end_time = Time.parse(options[:end_time])
+ end
@location = options[:location]
+ @privacy = options[:privacy]
if options[:venue]
@venue = FbGraph::Venue.new(options[:venue])
end
- @privacy = options[:privacy]
- @updated_time = options[:updated_time]
+ if options[:updated_time]
+ @updated_time = Time.parse(options[:updated_time])
+ end
end
end
end
\ No newline at end of file