From 92f46838561786abc4786cb508fe11ecd4158915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zieliski?= Date: Tue, 13 Aug 2024 08:21:33 +0200 Subject: [PATCH] Fix date format in R2 invoices and R1 --- WebAPI/Controllers/LayersController.cs | 2 +- WebAPI/dataProcessors/t1.r1.processor.cs | 4 ++-- WebAPI/dataProcessors/t4.r2.processor.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/WebAPI/Controllers/LayersController.cs b/WebAPI/Controllers/LayersController.cs index 6083e24..6be43da 100644 --- a/WebAPI/Controllers/LayersController.cs +++ b/WebAPI/Controllers/LayersController.cs @@ -352,7 +352,7 @@ public class LayersController : Controller //"T3-MultiSourceSummary", // AA //"T3-MultiSourceYearSummary", // AA/13 //"T4-SingleSource", - //"T1-R1", + "T1-R1", "T4-R2" ]; diff --git a/WebAPI/dataProcessors/t1.r1.processor.cs b/WebAPI/dataProcessors/t1.r1.processor.cs index e54bde4..46e9a62 100644 --- a/WebAPI/dataProcessors/t1.r1.processor.cs +++ b/WebAPI/dataProcessors/t1.r1.processor.cs @@ -247,7 +247,7 @@ public class T1R1Processor // update time var timeUtc = new List { - r1!.ModifiedAt.ToString("G") + r1!.ModifiedAt.ToString("dd.MM.yyyy HH:mm:ss", CultureInfo.GetCultureInfo("pl-PL")) }; var valueRangeUtcTime = new ValueRange { @@ -261,7 +261,7 @@ public class T1R1Processor var warsawTime = TimeZoneInfo.ConvertTimeFromUtc(r1.ModifiedAt.ToUniversalTime(), warsawTimeZone); var timeWarsaw = new List { - warsawTime.ToString("G") + warsawTime.ToString("dd.MM.yyyy HH:mm:ss", CultureInfo.GetCultureInfo("pl-PL")) }; var valueRangeWarsawTime = new ValueRange { diff --git a/WebAPI/dataProcessors/t4.r2.processor.cs b/WebAPI/dataProcessors/t4.r2.processor.cs index cccb149..f6f9283 100644 --- a/WebAPI/dataProcessors/t4.r2.processor.cs +++ b/WebAPI/dataProcessors/t4.r2.processor.cs @@ -325,7 +325,7 @@ public class T4R2Processor { var invoiceDate = DateTime.ParseExact(invoice.Code!.Substring(0, 8), "yyyyMMdd", CultureInfo.InvariantCulture) - .ToString("d"); + .ToString("dd.MM.yyyy", CultureInfo.GetCultureInfo("pl-PL")); var invoiceRow = new List { invoiceDate,