Fix query in WorkDataSaubStat

This commit is contained in:
ngfrolov 2024-02-08 15:14:33 +05:00
parent bb4c11bd3e
commit 7282eb1cfa
Signed by: ng.frolov
GPG Key ID: E99907A0357B29A7

View File

@ -48,7 +48,7 @@ namespace AsbCloudInfrastructure.Background.PeriodicWorks
for( var i =0; i < idTelemetries.Length; i++)
{
var idTelemetry = idTelemetries[i];
var lastDate = stats.FirstOrDefault(s => s.IdTelemetry == idTelemetry)?.DateEnd ?? DateTimeOffset.UnixEpoch;
var lastDate = stats.FirstOrDefault(s => s.IdTelemetry == idTelemetry)?.DateEnd.ToUniversalTime() ?? DateTimeOffset.UnixEpoch;
var statsCount = await CreateStatForTelemetryFromDate(db, idTelemetry, lastDate, dataSaubStatRepo, token);
onProgressCallback($"Calculate stat for telemetry: {idTelemetry}; from {lastDate}; results count: {statsCount};", 100*i / idTelemetries.Length);
}