mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 13:15:07 +00:00
Merge remote-tracking branch 'origin/ConnectPro_v1.2' into ConnectPro_v1.3
# Conflicts: # ICD.Common.Utils/ProgramUtils.SimplSharp.cs
This commit is contained in:
@@ -98,6 +98,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||||||
- Better VC-4 support for IcdConsole
|
- Better VC-4 support for IcdConsole
|
||||||
- JSON refactoring for simpler deserialization
|
- JSON refactoring for simpler deserialization
|
||||||
|
|
||||||
|
## [8.9.0] - 2020-04-30
|
||||||
|
### Changed
|
||||||
|
- ProgramUtils and ProcessorUtils return dates instead of strings for date properties
|
||||||
|
|
||||||
## [8.8.1] - 2020-02-18
|
## [8.8.1] - 2020-02-18
|
||||||
### Changed
|
### Changed
|
||||||
- IcdTimer - fixed issue that prevented OnElapsed event from firing when Length is less than (or close to) Heartbeat Interval
|
- IcdTimer - fixed issue that prevented OnElapsed event from firing when Length is less than (or close to) Heartbeat Interval
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using ICD.Common.Utils.Services;
|
using System.Globalization;
|
||||||
|
using ICD.Common.Utils.Services;
|
||||||
using ICD.Common.Utils.Services.Logging;
|
using ICD.Common.Utils.Services.Logging;
|
||||||
#if SIMPLSHARP
|
#if SIMPLSHARP
|
||||||
using System;
|
using System;
|
||||||
@@ -99,7 +100,7 @@ namespace ICD.Common.Utils
|
|||||||
/// Gets the date that the firmware was updated.
|
/// Gets the date that the firmware was updated.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public static string ModelVersionDate
|
public static DateTime ModelVersionDate
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -107,12 +108,12 @@ namespace ICD.Common.Utils
|
|||||||
Match match = regex.Match(VersionResult);
|
Match match = regex.Match(VersionResult);
|
||||||
|
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
return match.Groups["date"].Value;
|
return DateTime.ParseExact(match.Groups["date"].Value, "MMM dd yyyy", CultureInfo.InvariantCulture).ToUniversalTime();
|
||||||
|
|
||||||
ServiceProvider.TryGetService<ILoggerService>()
|
ServiceProvider.TryGetService<ILoggerService>()
|
||||||
.AddEntry(eSeverity.Warning, "Unable to get model version date from \"{0}\"", VersionResult);
|
.AddEntry(eSeverity.Warning, "Unable to get model version date from \"{0}\"", VersionResult);
|
||||||
|
|
||||||
return string.Empty;
|
return DateTime.MinValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,12 +31,12 @@ namespace ICD.Common.Utils
|
|||||||
/// Gets the date that the firmware was updated.
|
/// Gets the date that the firmware was updated.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public static string ModelVersionDate
|
public static DateTime ModelVersionDate
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return null;
|
return DateTime.MinValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,16 @@ namespace ICD.Common.Utils
|
|||||||
/// Gets the compile date of the program.
|
/// Gets the compile date of the program.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public static string CompiledDate { get { return ProgComments.GetDefault(COMPILED_ON_KEY, null); } }
|
public static DateTime CompiledDate
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string dateString;
|
||||||
|
return ProgComments.TryGetValue(COMPILED_ON_KEY, out dateString)
|
||||||
|
? DateTime.Parse(dateString).ToUniversalTime()
|
||||||
|
: DateTime.MinValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the compiler revision version.
|
/// Gets the compiler revision version.
|
||||||
@@ -94,7 +103,7 @@ namespace ICD.Common.Utils
|
|||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public static DateTime ProgramInstallDate
|
public static DateTime ProgramInstallDate
|
||||||
{
|
{
|
||||||
get { return IcdFile.GetCreationTime(PathUtils.Join(PathUtils.ProgramPath, ProgramFile)); }
|
get { return IcdFile.GetCreationTime(PathUtils.Join(PathUtils.ProgramPath, ProgramFile)).ToUniversalTime(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -18,11 +18,11 @@ namespace ICD.Common.Utils
|
|||||||
/// Gets the compile date of the program.
|
/// Gets the compile date of the program.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public static string CompiledDate
|
public static DateTime CompiledDate
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return IcdFile.GetLastWriteTime(Assembly.GetEntryAssembly().Location).ToString();
|
return IcdFile.GetLastWriteTime(Assembly.GetEntryAssembly().Location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user