Permalink
Browse files

Also serialize exdates and rdates for backward compat

  • Loading branch information...
1 parent 05f8677 commit fb841a24ae3da98973cae1c8e8e641d534f0be20 @seejohnrun committed Feb 25, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/ice_cube/schedule.rb
@@ -302,6 +302,13 @@ def self.from_hash(data, options = {})
data[:extimes] && data[:extimes].each do |t|
schedule.add_exception_time TimeUtil.deserialize_time(t)
end
+ # Also serialize old format for backward compat
+ data[:rdates] && data[:rdates].each do |t|
+ schedule.add_recurrence_time TimeUtil.deserialize_time(t)
+ end
+ data[:exdates] && data[:exdates].each do |t|
+ schedule.add_exception_time TimeUtil.deserialize_time(t)
+ end
schedule
end

0 comments on commit fb841a2

Please sign in to comment.