Merge pull request 'Фикс импорта операций' (#213) from fix/import_well_operations into master

Reviewed-on: http://test.digitaldrilling.ru:8080/DDrilling/AsbCloudServer/pulls/213
This commit is contained in:
Никита Фролов 2024-02-05 17:31:40 +05:00
commit 3b7616ba43
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);
}