forked from ddrilling/AsbCloudServer
Fix TelemetryDataBaseService.GetAsync Db dateTime timezone TimestampBehavior
This commit is contained in:
parent
1c1a33aeee
commit
5e0ab46e57
@ -166,10 +166,16 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
|||||||
.AsNoTracking();
|
.AsNoTracking();
|
||||||
|
|
||||||
if (request.GeDate.HasValue)
|
if (request.GeDate.HasValue)
|
||||||
query = query.Where(d => d.DateTime >= request.GeDate);
|
{
|
||||||
|
var geDate = request.GeDate.Value.UtcDateTime;
|
||||||
|
query = query.Where(d => d.DateTime >= geDate);
|
||||||
|
}
|
||||||
|
|
||||||
if (request.LeDate.HasValue)
|
if (request.LeDate.HasValue)
|
||||||
query = query.Where(d => d.DateTime >= request.LeDate);
|
{
|
||||||
|
var leDate = request.LeDate.Value.UtcDateTime;
|
||||||
|
query = query.Where(d => d.DateTime <= leDate);
|
||||||
|
}
|
||||||
|
|
||||||
if (request.Divider > 1)
|
if (request.Divider > 1)
|
||||||
query = query.Where((d) => (((d.DateTime.DayOfYear * 24 + d.DateTime.Hour) * 60 + d.DateTime.Minute) * 60 + d.DateTime.Second) % request.Divider == 0);
|
query = query.Where((d) => (((d.DateTime.DayOfYear * 24 + d.DateTime.Hour) * 60 + d.DateTime.Minute) * 60 + d.DateTime.Second) % request.Divider == 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user