mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-13 19:55:02 +00:00
fix: XmlReaderExtensions handling both TimeSpan formats
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user