Фикс репозитория и метода расширения

This commit is contained in:
Степанов Дмитрий 2024-02-05 14:27:45 +02:00
parent e409bd4405
commit 0334d5f42e
2 changed files with 2 additions and 3 deletions

View File

@ -528,7 +528,7 @@ public class WellOperationRepository : IWellOperationRepository
.Min(subOp => subOp.DateStart))
.TotalDays,
IdUser = o.IdUser,
LastUpdateDate = DateTime.SpecifyKind(o.LastUpdateDate.UtcDateTime + timeZoneOffset, DateTimeKind.Unspecified)
LastUpdateDate = o.LastUpdateDate.ToOffset(TimeSpan.FromHours(timezone.Hours))
});
if (request.SortFields?.Any() == true)

View File

@ -2,7 +2,6 @@
using System;
using System.Globalization;
using System.IO;
using AsbCloudInfrastructure.Services.DailyReport;
namespace AsbCloudInfrastructure;
@ -197,7 +196,7 @@ internal static class XLExtentions
return (T)Convert.ChangeType(cell.GetFormattedString(), typeof(T), CultureInfo.InvariantCulture);
if (cell.Value is DateTime dateTime)
return (T)(object)dateTime;
return (T)(object)DateTime.SpecifyKind(dateTime, DateTimeKind.Unspecified);
return (T)(object)DateTime.FromOADate((double)cell.Value);
}