From 2f0481e310738589c4e985119a4c3f49e3917385 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Sun, 15 Jan 2017 20:49:42 +0100 Subject: [PATCH] Got rid of a few DateTime.MinValue that MySQL doesn't like --- Database/Database-People.cs | 2 +- Logic/Swarm/Participations.cs | 2 +- Site/Pages/v5/Ledgers/Json-OutstandingAccounts.aspx.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Database/Database-People.cs b/Database/Database-People.cs index f6087b30..404f04aa 100644 --- a/Database/Database-People.cs +++ b/Database/Database-People.cs @@ -550,7 +550,7 @@ namespace Swarmops.Database public int CreatePerson(string name, string email) { return CreatePerson (name, email, string.Empty, string.Empty, string.Empty, string.Empty, 0, - DateTime.MinValue, PersonGender.Unknown); + new DateTime(1800,1,1), PersonGender.Unknown); } protected void SetPersonBasicStringValue (int personId, string key, string newValue) diff --git a/Logic/Swarm/Participations.cs b/Logic/Swarm/Participations.cs index 47de7dc3..8f30fc42 100644 --- a/Logic/Swarm/Participations.cs +++ b/Logic/Swarm/Participations.cs @@ -85,7 +85,7 @@ namespace Swarmops.Logic.Swarm public static Participations GetExpired (Organization organization) { return - FromArray (SwarmDb.GetDatabaseForReading().GetExpiringParticipations (organization, DateTime.MinValue, + FromArray (SwarmDb.GetDatabaseForReading().GetExpiringParticipations (organization, new DateTime(1800,1,1), DateTime.Now)); } diff --git a/Site/Pages/v5/Ledgers/Json-OutstandingAccounts.aspx.cs b/Site/Pages/v5/Ledgers/Json-OutstandingAccounts.aspx.cs index 9fc33b48..beb9df34 100644 --- a/Site/Pages/v5/Ledgers/Json-OutstandingAccounts.aspx.cs +++ b/Site/Pages/v5/Ledgers/Json-OutstandingAccounts.aspx.cs @@ -61,12 +61,12 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers if (renderPresentTime) { - ledgerExpectedCents = balanceAccount.GetDeltaCents (DateTime.MinValue, DateTime.MaxValue); + ledgerExpectedCents = balanceAccount.GetDeltaCents (new DateTime (1800,1,1), DateTime.MaxValue); // get ALL transactions } else { - ledgerExpectedCents = balanceAccount.GetDeltaCents (DateTime.MinValue, targetDateTime); + ledgerExpectedCents = balanceAccount.GetDeltaCents (new DateTime(1800,1,1), targetDateTime); } if (reverseLedgerSign)