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; }