lib/d3/client/receipt.rb in depot3-3.0.15 vs lib/d3/client/receipt.rb in depot3-3.0.20

- old
+ new

@@ -570,11 +570,11 @@ if @jamf_rcpt_file.parent != JSS::Client::RECEIPTS_FOLDER @jamf_rcpt_file = JSS::Client::RECEIPTS_FOLDER + @jamf_rcpt_file end @apple_pkg_ids = args[:apple_pkg_ids] - @installed_at = args[:installed_at] + @installed_at = args[:installed_at] ? args[:installed_at].to_time : Time.now @removable = args[:removable] @prohibiting_processes = args[:prohibiting_processes] @prohibiting_processes ||= [] @@ -1128,10 +1128,10 @@ all_usages = [] plists.each do |plist| usage_times = D3.parse_plist plist my_usage_keys = usage_times.keys.map{|p| Pathname.new(p)} exp_paths_with_usage = @expiration_paths & my_usage_keys - exp_paths_with_usage.each{|p| all_usages << usage_times[p.to_s] } + exp_paths_with_usage.each{|p| all_usages << usage_times[p.to_s].to_time } end # do plist @last_usage = all_usages.compact.max # if never been used, last usage is the install date