forked from ddrilling/AsbCloudServer
Fixed date intervals in .GetOperationsSummaryAsync()
This commit is contained in:
parent
b022a4c1cb
commit
4b8a161ed5
@ -161,8 +161,12 @@ namespace AsbCloudInfrastructure.Services
|
||||
if (telemetryId is null)
|
||||
return null;
|
||||
|
||||
var unixBegin = (begin - new DateTime(1970, 1, 1)).TotalSeconds;
|
||||
var unixEnd = (end - new DateTime(1970, 1, 1)).TotalSeconds;
|
||||
var unixBegin = begin == default
|
||||
? 0
|
||||
: (begin - new DateTime(1970, 1, 1)).TotalSeconds;
|
||||
var unixEnd = end == default
|
||||
? (DateTime.Now - new DateTime(1970, 1, 1)).TotalSeconds
|
||||
: (end - new DateTime(1970, 1, 1)).TotalSeconds;
|
||||
|
||||
return await (from a in db.TelemetryAnalysis
|
||||
where a.IdTelemetry == telemetryId &&
|
||||
|
Loading…
Reference in New Issue
Block a user