Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$processScriptFragments[] = '--dry-run';
}

$process = new Process(
implode(' ', $processScriptFragments)
);
$process = new Process($processScriptFragments);

$process->setEnv(['INNER_CALL' => 1]);
$process->run();
Expand Down Expand Up @@ -272,7 +270,7 @@ protected function processTimestamps($offset, $limit, $output)
$dateTimeInUTC->setTimezone(new DateTimeZone('UTC'));

foreach ($timestampBasedFields as $timestampBasedField) {
$timestamp = $timestampBasedField['data_int'];
$timestamp = (int)$timestampBasedField['data_int'];
$dateTimeInUTC->setTimestamp($timestamp);
$newTimestamp = $this->convertToUtcTimestamp($timestamp);

Expand Down Expand Up @@ -373,7 +371,7 @@ protected function convertToUtcTimestamp($timestamp)
$dateTimeZone = new DateTimeZone($this->timezone);
$dateTimeZoneUTC = new DateTimeZone('UTC');

$dateTime = new DateTime(null, $dateTimeZone);
$dateTime = new DateTime('now', $dateTimeZone);
$dateTime->setTimestamp($timestamp);
$dateTimeUTC = new DateTime($dateTime->format('Y-m-d H:i:s'), $dateTimeZoneUTC);

Expand Down