fix: XmlReaderExtensions handling both TimeSpan formats

This commit is contained in:
Chris Cameron
2019-05-14 16:16:22 -04:00
parent 4c93515f83
commit 9f0e66e4a1

View File

@@ -409,6 +409,17 @@ namespace ICD.Common.Utils.Xml
throw new ArgumentNullException("extends");
string content = extends.ReadElementContentAsString();
try
{
// 00:00:00 format
return TimeSpan.Parse(content);
}
catch (FormatException)
{
}
// PT0S format
return IcdXmlConvert.ToTimeSpan(content);
}