forked from ddrilling/AsbCloudServer
Изменение типа даты в FileRequest и FileRepository
This commit is contained in:
parent
ec2abd224e
commit
2ae1cd2e3d
@ -33,12 +33,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>
|
||||
/// Признак удаления
|
||||
|
@ -53,13 +53,13 @@ namespace AsbCloudInfrastructure.Repository
|
||||
|
||||
if (request.Begin is not null)
|
||||
{
|
||||
var beginUtc = request.Begin.Value.ToUtcDateTimeOffset(timezoneOffsetHours);
|
||||
var beginUtc = request.Begin.Value.ToUniversalTime();
|
||||
query = query.Where(e => e.UploadDate >= beginUtc);
|
||||
}
|
||||
|
||||
if (request.End is not null)
|
||||
{
|
||||
var endUtc = request.End.Value.ToUtcDateTimeOffset(timezoneOffsetHours);
|
||||
var endUtc = request.End.Value.ToUniversalTime();
|
||||
query = query.Where(e => e.UploadDate <= endUtc);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user