From 62e30b0e8b49927701ce25d47e39fd9b382b7723 Mon Sep 17 00:00:00 2001 From: Olga Nemt Date: Thu, 21 Mar 2024 10:54:41 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BC=D0=B5=D0=BD=D0=B0=20=D1=84=D0=BE?= =?UTF-8?q?=D1=80=D0=BC=D0=B0=D1=82=D0=B0=20=D0=B4=D0=B0=D1=82=D1=8B=20?= =?UTF-8?q?=D0=B2=20DrillTestReportDataDto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudApp/Data/DrillTestReport/DrillTestReportDataDto.cs | 2 +- .../Services/DrillTestReport/DrillTestReportService.cs | 2 +- AsbCloudInfrastructure/XLExtentions.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/AsbCloudApp/Data/DrillTestReport/DrillTestReportDataDto.cs b/AsbCloudApp/Data/DrillTestReport/DrillTestReportDataDto.cs index ee63bf9b..b45783e6 100644 --- a/AsbCloudApp/Data/DrillTestReport/DrillTestReportDataDto.cs +++ b/AsbCloudApp/Data/DrillTestReport/DrillTestReportDataDto.cs @@ -21,6 +21,6 @@ namespace AsbCloudApp.Data.DrillTestReport /// /// Дата отчета /// - public DateTime Date { get; set; } = DateTime.Now; + public DateTimeOffset Date { get; set; } = DateTimeOffset.Now; } } diff --git a/AsbCloudInfrastructure/Services/DrillTestReport/DrillTestReportService.cs b/AsbCloudInfrastructure/Services/DrillTestReport/DrillTestReportService.cs index 983d1f7c..897e8724 100644 --- a/AsbCloudInfrastructure/Services/DrillTestReport/DrillTestReportService.cs +++ b/AsbCloudInfrastructure/Services/DrillTestReport/DrillTestReportService.cs @@ -49,7 +49,7 @@ namespace AsbCloudInfrastructure.Services.DrillTestReport well.Deposit ?? "-", well.Cluster ?? "-", well.Caption ?? "-"), - Date = DateTime.Now, + Date = DateTimeOffset.Now, }; var fileName = string.Format("Drill_test_{0}.xlsx", dto.TimeStampStart.ToString("dd.mm.yyyy_HH_MM_ss")); diff --git a/AsbCloudInfrastructure/XLExtentions.cs b/AsbCloudInfrastructure/XLExtentions.cs index e9cf11f5..0a784e9a 100644 --- a/AsbCloudInfrastructure/XLExtentions.cs +++ b/AsbCloudInfrastructure/XLExtentions.cs @@ -17,7 +17,7 @@ public static class XLExtentions public static IXLCell SetCellValue(this IXLCell cell, T value, string? format = null) { - if (typeof(T) == typeof(DateTime)) + if (typeof(T) == typeof(DateTime) || typeof(T) == typeof(DateTimeOffset)) { cell.Style.DateFormat.Format = format ?? "DD.MM.YYYY HH:MM:SS"; }