Skip to content

Commit

Permalink
Fix #176 - shift to UTC timezone for prepare records for database
Browse files Browse the repository at this point in the history
  • Loading branch information
lochmueller committed Aug 25, 2017
1 parent 9762fa7 commit 857e067
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Classes/Service/IndexPreparationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ public function prepareIndex($configurationKey, $tableName, $uid)
$record['foreign_uid'] = $uid;
$record['unique_register_key'] = $configurationKey;

// UTC fix
$record['start_date'] = \DateTime::createFromFormat(
'Y-m-d',
$record['start_date']->format('Y-m-d'),
new \DateTimeZone('UTC')
);
$record['end_date'] = \DateTime::createFromFormat(
'Y-m-d',
$record['end_date']->format('Y-m-d'),
new \DateTimeZone('UTC')
);

$this->prepareRecordForDatabase($record);
$neededItems[$key] = $record;
}
Expand Down

0 comments on commit 857e067

Please sign in to comment.