gem: support date format used by OpenVPN 2.5

- smooth fallback
This commit is contained in:
cn authored and Christian Nicolai committed 2022-01-18 17:07:33 +01:00
1 parent 528709c895
commit 9ad59194bd
4 files changed
+19

No files matched your search

@@ -45,6 +45,8 @@ 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
DateTime.strptime(date_string, '%Y-%m-%d %k:%M:%S')
end
end
end