From f0ba16b443bcd64559c93e94fb7557e7fd954b4b Mon Sep 17 00:00:00 2001 From: Dan Bernier Date: Fri, 26 Jul 2024 18:11:02 -0400 Subject: [PATCH] Try fixing date-parse issues w/ struct tests --- lib/puma/acme/structs.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/puma/acme/structs.rb b/lib/puma/acme/structs.rb index 5ee337c..9c87475 100644 --- a/lib/puma/acme/structs.rb +++ b/lib/puma/acme/structs.rb @@ -142,7 +142,9 @@ def self.from(acme_order) end def expired?(now: Time.now.utc) - expires < now + exp = expires + exp = DateTime.parse(expires).to_time if expires.is_a?(String) + exp < now end end end