Fixed time zone bug on PayPal import (and similar account statements) - now doing ToLocalTime() consistently
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user