diff --git a/AsbCloudInfrastructure/Repository/WellOperationRepository.cs b/AsbCloudInfrastructure/Repository/WellOperationRepository.cs index c9d3c7fc..5e13827e 100644 --- a/AsbCloudInfrastructure/Repository/WellOperationRepository.cs +++ b/AsbCloudInfrastructure/Repository/WellOperationRepository.cs @@ -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) diff --git a/AsbCloudInfrastructure/XLExtentions.cs b/AsbCloudInfrastructure/XLExtentions.cs index 3a583bf9..09a5c40b 100644 --- a/AsbCloudInfrastructure/XLExtentions.cs +++ b/AsbCloudInfrastructure/XLExtentions.cs @@ -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); }