diff --git a/Core/DataObjects/ProfitTrailerData.cs b/Core/DataObjects/ProfitTrailerData.cs index 8b5d5cf..29bbb6b 100644 --- a/Core/DataObjects/ProfitTrailerData.cs +++ b/Core/DataObjects/ProfitTrailerData.cs @@ -250,7 +250,7 @@ namespace Core.Main.DataObjects rdldDateTime = rdldDateTime.AddSeconds(rdld.firstBoughtDate).ToLocalTime(); // Profit Trailer bought times are saved in UTC - if (rdld.firstBoughtDate != null) + if (rdld.firstBoughtDate > 0) { DateTimeOffset ptFirstBoughtDate = DateTimeOffset.Parse(rdldDateTime.Year.ToString() + "-" + rdldDateTime.Month.ToString("00") + "-" + rdldDateTime.Day.ToString("00") + "T" + rdldDateTime.Hour.ToString("00") + ":" + rdldDateTime.Minute.ToString("00") + ":" + rdldDateTime.Second.ToString("00"), CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal); @@ -312,7 +312,7 @@ namespace Core.Main.DataObjects rpldDateTime = rpldDateTime.AddSeconds(rpld.firstBoughtDate).ToLocalTime(); // Profit Trailer bought times are saved in UTC - if (rpld.firstBoughtDate != null) + if (rpld.firstBoughtDate > 0) { DateTimeOffset ptFirstBoughtDate = DateTimeOffset.Parse(rpldDateTime.Year.ToString() + "-" + rpldDateTime.Month.ToString("00") + "-" + rpldDateTime.Day.ToString("00") + "T" + rpldDateTime.Hour.ToString("00") + ":" + rpldDateTime.Minute.ToString("00") + ":" + rpldDateTime.Second.ToString("00"), CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal); diff --git a/Core/Main/PTMagic.cs b/Core/Main/PTMagic.cs index 8aa8de1..31aad35 100644 --- a/Core/Main/PTMagic.cs +++ b/Core/Main/PTMagic.cs @@ -791,7 +791,7 @@ namespace Core.Main if (PTMagicConfiguration.GeneralSettings.Application.IsEnabled) { - + // Validate settings this.ValidateSettings(); @@ -963,6 +963,9 @@ namespace Core.Main private void ValidateSettings() { + //Reimport Initial ProfitTrailer Information + SettingsAPI.GetInitialProfitTrailerSettings(this.PTMagicConfiguration); + // Check for a valid exchange if (this.PTMagicConfiguration.GeneralSettings.Application.Exchange == null) {