Skip to content

Commit c248432

Browse files
rasgormschwemer
authored andcommitted
Add fakerequest and fix strftime
1 parent 0b8fc57 commit c248432

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Classes/Command/ExportCommand.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,16 @@
1919
*/
2020
class ExportCommand extends Command
2121
{
22+
23+
use FakeRequestTrait;
24+
2225
/**
2326
* @return void
2427
*/
2528
public function configure()
2629
{
30+
$this->fakeRequest();
31+
2732
$description =
2833
'This task can send a mail export with an attachment (XLS or CSV) to a receiver or a group of receivers';
2934
$this->setDescription($description);
@@ -104,7 +109,7 @@ protected function getFilterVariables(int $period): array
104109
if ($period > 0) {
105110
$variables = [
106111
'filter' => [
107-
'start' => strftime('%Y-%m-%d %H:%M:%S', (time() - $period)),
112+
'start' => date('Y-m-d H:i:s', (time() - $period)),
108113
'stop' => 'now',
109114
],
110115
];

0 commit comments

Comments
 (0)