forked from ddrilling/AsbCloudServer
Merge branch 'feature/#30435481-unification-date/time' into feature/refactoring_well_operation
# Conflicts: # AsbCloudInfrastructure/Repository/WellOperationRepository.cs
This commit is contained in:
commit
0fb65c7e83
@ -112,7 +112,7 @@ namespace AsbCloudInfrastructure.Repository
|
||||
private static TEntity Convert(Tdto dto)
|
||||
{
|
||||
var entity = dto.Adapt<TEntity>();
|
||||
entity.UpdateDate = DateTimeOffset.Now;
|
||||
entity.UpdateDate = DateTimeOffset.UtcNow;
|
||||
return entity;
|
||||
}
|
||||
}
|
||||
|
@ -68,8 +68,6 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
||||
|
||||
query = query.OrderByDescending(m => m.DateTime);
|
||||
|
||||
var timezone = telemetryService.GetTimezone(telemetry.Id);
|
||||
|
||||
if (request.Begin is not null)
|
||||
{
|
||||
var beginUtc = request.Begin.Value.ToUniversalTime();
|
||||
@ -102,6 +100,7 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
||||
var usersDict = users.ToDictionary(x => x.IdUser, x => x);
|
||||
|
||||
var messagesDtoList = new List<MessageDto>();
|
||||
var timezone = telemetryService.GetTimezone(telemetry.Id);
|
||||
|
||||
foreach (var message in messagesList)
|
||||
{
|
||||
|
@ -41,7 +41,7 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
||||
public async Task<int> InsertAsync(SetpointsRequestDto setpointsRequest, CancellationToken token)
|
||||
{
|
||||
setpointsRequest.IdState = 1;
|
||||
setpointsRequest.UploadDate = DateTime.UtcNow;
|
||||
setpointsRequest.UploadDate = DateTimeOffset.UtcNow;
|
||||
var result = await setpointsRepository.InsertAsync(setpointsRequest, token);
|
||||
return result;
|
||||
}
|
||||
|
@ -22,7 +22,10 @@ namespace AsbCloudWebApi.Converters
|
||||
{
|
||||
if (value is string str)
|
||||
{
|
||||
return DateOnly.Parse(str);
|
||||
if (DateTimeOffset.TryParse(str, out DateTimeOffset dateTime))
|
||||
return DateOnly.FromDateTime(dateTime.Date);
|
||||
if (DateTime.TryParse(str, out DateTime date))
|
||||
return DateOnly.FromDateTime(date);
|
||||
}
|
||||
return base.ConvertFrom(context, culture, value);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user