From 39adc74fbce90bee6fe15b852faa32adc1936429 Mon Sep 17 00:00:00 2001 From: cn Date: Tue, 18 Jan 2022 17:06:15 +0100 Subject: [PATCH] gem: Date::Error is not in Ruby 2.6 and older, use ArgumentError --- lib/openvpn-status-web/parser/modern_stateless.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/openvpn-status-web/parser/modern_stateless.rb b/lib/openvpn-status-web/parser/modern_stateless.rb index de01813..b9dae1c 100644 --- a/lib/openvpn-status-web/parser/modern_stateless.rb +++ b/lib/openvpn-status-web/parser/modern_stateless.rb @@ -45,7 +45,7 @@ module OpenVPNStatusWeb private_class_method def self.parse_date(date_string) DateTime.strptime(date_string, '%a %b %d %k:%M:%S %Y') - rescue Date::Error + rescue ArgumentError DateTime.strptime(date_string, '%Y-%m-%d %k:%M:%S') end end