forked from ddrilling/AsbCloudServer
Смена типа дат для MessageRequestBase
This commit is contained in:
parent
ef9466f90d
commit
0bbbb43802
@ -17,12 +17,12 @@ namespace AsbCloudApp.Requests
|
||||
/// <summary>
|
||||
/// начальная дата
|
||||
/// </summary>
|
||||
public DateTime? Begin { get; set; }
|
||||
public DateTimeOffset? Begin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// конечная дата
|
||||
/// </summary>
|
||||
public DateTime? End { get; set; }
|
||||
public DateTimeOffset? End { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// строка поиска
|
||||
|
@ -72,13 +72,13 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
||||
|
||||
if (request.Begin is not null)
|
||||
{
|
||||
var beginUtc = request.Begin.Value.ToUtcDateTimeOffset(timezone.Hours);
|
||||
var beginUtc = request.Begin.Value.ToUniversalTime();
|
||||
query = query.Where(m => m.DateTime >= beginUtc);
|
||||
}
|
||||
|
||||
if (request.End is not null)
|
||||
{
|
||||
var endUtc = request.End.Value.ToUtcDateTimeOffset(timezone.Hours);
|
||||
var endUtc = request.End.Value.ToUniversalTime();
|
||||
query = query.Where(m => m.DateTime <= endUtc);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user