1
0
mirror of https://github.com/cmur2/openvpn-status-web.git synced 2024-11-17 06:56:13 +01:00

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

This commit is contained in:
cn 2022-01-18 17:06:15 +01:00 committed by Christian Nicolai
parent 9ad59194bd
commit 39adc74fbc

View File

@ -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