gem: Date::Error is not in Ruby 2.6 and older, use ArgumentError

This commit is contained in:
cn authored and Christian Nicolai committed 2022-01-18 17:07:33 +01:00
1 parent 9ad59194bd
commit 39adc74fbc
1 file changed
+1 -1
@@ -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