From f66d20e0390a41841a089005659c9dccd45a8f15 Mon Sep 17 00:00:00 2001 From: gamer147 Date: Tue, 26 May 2026 14:08:40 -0400 Subject: [PATCH] fix(payment-items): use ImporterBase.ParseWireDateTime --- SVSim.Bootstrap/Importers/PaymentItemImporter.cs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/SVSim.Bootstrap/Importers/PaymentItemImporter.cs b/SVSim.Bootstrap/Importers/PaymentItemImporter.cs index 06260d2..0527164 100644 --- a/SVSim.Bootstrap/Importers/PaymentItemImporter.cs +++ b/SVSim.Bootstrap/Importers/PaymentItemImporter.cs @@ -42,11 +42,11 @@ public class PaymentItemImporter entry.PurchaseLimit = s.PurchaseLimit; entry.SpecialShopFlag = s.SpecialShopFlag; entry.ImageName = s.ImageName; - entry.StartTime = ParseDate(s.StartTime); - entry.EndTime = ParseDate(s.EndTime); + entry.StartTime = ImporterBase.ParseWireDateTime(s.StartTime); + entry.EndTime = ImporterBase.ParseWireDateTime(s.EndTime); entry.RemainingTime = s.RemainingTime; entry.IsResaleProduct = s.IsResaleProduct; - entry.ResaleStartDate = string.IsNullOrWhiteSpace(s.ResaleStartDate) ? null : ParseDate(s.ResaleStartDate); + entry.ResaleStartDate = string.IsNullOrWhiteSpace(s.ResaleStartDate) ? null : ImporterBase.ParseWireDateTime(s.ResaleStartDate); if (ex is null) { @@ -61,9 +61,4 @@ public class PaymentItemImporter Console.WriteLine($"[PaymentItemImporter] +{created}/~{updated}"); return created + updated; } - - private static DateTime ParseDate(string s) => - DateTime.TryParse(s, CultureInfo.InvariantCulture, - DateTimeStyles.AssumeUniversal | DateTimeStyles.AdjustToUniversal, - out var dt) ? dt : DateTime.MinValue; }