Fixed time zone bug on PayPal import (and similar account statements) - now doing ToLocalTime() consistently

This commit is contained in:
Rick Falkvinge
2014-08-19 17:39:36 +00:00
parent a7ad953a22
commit 9a16f487b5
3 changed files with 11 additions and 2 deletions
+4
View File
@@ -166,6 +166,10 @@ namespace Swarmops.Logic.Financial
TimeSpan timeZone = TimeSpan.Parse(timeZoneString);
dateTime -= timeZone; // minus, to bring the time to UTC. If time 13:00 is in tz +01:00, the UTC time is 12:00
// Then move from UTC to local time, to match various bookkeeping laws. TODO: local time per organization, perhaps?
dateTime = dateTime.ToLocalTime();
}
// PILOT SPECIAL CASE: if Paypal and PPSE Pilot program, ignore everything before 2014
+5 -1
View File
@@ -136,7 +136,11 @@
setTimeout('updateProgressProcessing();', 1000);
}
}
},
error: function(msg) {
// Retry on call error, too
setTimeout('updateProgressProcessing();', 1000);
}
});
}
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
@@ -527,7 +528,7 @@ namespace Swarmops.Site.Pages.Ledgers
progressUpdateInterval = 100;
}
foreach (ExternalBankDataRecord row in import.Records)
foreach (ExternalBankDataRecord row in import.Records)
{
// Update progress.