forked from ddrilling/AsbCloudServer
Правка типов дат в методах внутри FileRepository и TrajectoryEditableRepository
This commit is contained in:
parent
b5f71b9816
commit
09be968972
@ -9,7 +9,7 @@ namespace AsbCloudApp.Requests
|
||||
/// </summary>
|
||||
public class SubsystemRequest: RequestBase, IValidatableObject
|
||||
{
|
||||
private static readonly DateTime validationMinDate = new DateTime(2020,01,01,0,0,0,DateTimeKind.Utc);
|
||||
private static readonly DateTimeOffset validationMinDate = new DateTimeOffset(2020,01,01,0,0,0, TimeSpan.Zero);
|
||||
|
||||
/// <summary>
|
||||
/// идентификатор скважины
|
||||
|
@ -184,7 +184,7 @@ namespace AsbCloudInfrastructure.Repository
|
||||
|
||||
var newFileMark = fileMarkDto.Adapt<FileMark>();
|
||||
newFileMark.Id = default;
|
||||
newFileMark.DateCreated = DateTime.UtcNow;
|
||||
newFileMark.DateCreated = DateTimeOffset.UtcNow;
|
||||
newFileMark.IdUser = idUser;
|
||||
newFileMark.User = null!;
|
||||
|
||||
@ -244,7 +244,7 @@ namespace AsbCloudInfrastructure.Repository
|
||||
IdAuthor = newItem.IdAuthor,
|
||||
IdCategory = newItem.IdCategory,
|
||||
Name = newItem.Name,
|
||||
UploadDate = DateTime.UtcNow,
|
||||
UploadDate = DateTimeOffset.UtcNow,
|
||||
IsDeleted = false,
|
||||
Size = newItem.Size,
|
||||
};
|
||||
|
@ -115,7 +115,7 @@ namespace AsbCloudInfrastructure.Repository
|
||||
private static TEntity Convert(Tdto dto, double offsetHours)
|
||||
{
|
||||
var entity = dto.Adapt<TEntity>();
|
||||
entity.UpdateDate = DateTime.Now.ToUtcDateTimeOffset(offsetHours);
|
||||
entity.UpdateDate = DateTimeOffset.Now.ToOffset(TimeSpan.FromHours(offsetHours));
|
||||
return entity;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user