From 0334d5f42e2bdf3d21acff8667cd4aa83e4487f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D0=B5=D0=BF=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=94?= =?UTF-8?q?=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Mon, 5 Feb 2024 14:27:45 +0200 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D1=80=D0=B5=D0=BF?= =?UTF-8?q?=D0=BE=D0=B7=D0=B8=D1=82=D0=BE=D1=80=D0=B8=D1=8F=20=D0=B8=20?= =?UTF-8?q?=D0=BC=D0=B5=D1=82=D0=BE=D0=B4=D0=B0=20=D1=80=D0=B0=D1=81=D1=88?= =?UTF-8?q?=D0=B8=D1=80=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudInfrastructure/Repository/WellOperationRepository.cs | 2 +- AsbCloudInfrastructure/XLExtentions.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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); }