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:
parent
9ad59194bd
commit
39adc74fbc
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user