mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-12 19:25:00 +00:00
Merge remote-tracking branch 'origin/ConnectPro_v1.1' into ConnectPro_v1.2
# Conflicts: # CHANGELOG.md # ICD.Common.Utils/Properties/AssemblyInfo.cs
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using ICD.Common.Utils.Services;
|
||||
using System.Globalization;
|
||||
using ICD.Common.Utils.Services;
|
||||
using ICD.Common.Utils.Services.Logging;
|
||||
#if SIMPLSHARP
|
||||
using System;
|
||||
@@ -99,7 +100,7 @@ namespace ICD.Common.Utils
|
||||
/// Gets the date that the firmware was updated.
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public static string ModelVersionDate
|
||||
public static DateTime ModelVersionDate
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -107,12 +108,12 @@ namespace ICD.Common.Utils
|
||||
Match match = regex.Match(VersionResult);
|
||||
|
||||
if (match.Success)
|
||||
return match.Groups["date"].Value;
|
||||
return DateTime.ParseExact(match.Groups["date"].Value, "MMM dd yyyy", CultureInfo.InvariantCulture).ToUniversalTime();
|
||||
|
||||
ServiceProvider.TryGetService<ILoggerService>()
|
||||
.AddEntry(eSeverity.Warning, "Unable to get model version date from \"{0}\"", VersionResult);
|
||||
|
||||
return string.Empty;
|
||||
return DateTime.MinValue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user