Use absolute value on age in ExpireLogs
This commit is contained in:
@@ -96,7 +96,7 @@ namespace MarketData.Utils
|
||||
try
|
||||
{
|
||||
DateTime creationTime = File.GetCreationTime(logFile);
|
||||
int age = dateGenerator.DaysBetweenActual(currentDate, creationTime);
|
||||
int age = Math.Abs(dateGenerator.DaysBetweenActual(currentDate, creationTime));
|
||||
MDTrace.WriteLine($"[ExpireLogs ]{logFile} is {age} {(age>1?"days":"day")} old");
|
||||
if(age>=expiryDays)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user