Fix duration calculation.

This commit is contained in:
Markus Reiter 2023-02-12 01:40:13 +01:00
parent 1cf53b4281
commit 8c8065746b
No known key found for this signature in database
GPG Key ID: 245293B51702655B

View File

@ -101,7 +101,7 @@ module Homebrew
last_check_time = state["check_time"]&.then { |t| Time.parse(t) }
check_time = Time.now
if last_check_time && check_time < (last_check_time + (DateTime.now + 1).to_time)
if last_check_time && (check_time - last_check_time) / 3600 < 24
opoo "Skipping, already checked within the last 24 hours."
return
end