Bunq import can now handle timestamps.

This commit is contained in:
James Cole
2019-02-08 16:45:42 +01:00
parent 311d51464d
commit 40d77d82cd
4 changed files with 10 additions and 7 deletions

View File

@@ -457,7 +457,7 @@ class ImportArrayStorage
Log::debug(sprintf('Going to store entry %d of %d', $index + 1, $count));
// convert the date to an object:
$store['date'] = Carbon::createFromFormat('Y-m-d', $store['date']);
$store['date'] = Carbon::parse($store['date'], config('app.timezone'));
$store['description'] = '' === $store['description'] ? '(empty description)' : $store['description'];
// store the journal.
try {
@@ -556,7 +556,7 @@ class ImportArrayStorage
Log::debug(sprintf('Comparison is a hit! (%s)', $hits));
// compare date:
$transferDate = $transfer->date->format('Y-m-d');
$transferDate = $transfer->date->format('Y-m-d H:i:s');
Log::debug(sprintf('Comparing dates "%s" to "%s"', $transaction['date'], $transferDate));
if ($transaction['date'] !== $transferDate) {
continue; // @codeCoverageIgnore