diff --git a/Classes/Command/ExportCommand.php b/Classes/Command/ExportCommand.php
index 9b70cc967..2ac0c5c4e 100644
--- a/Classes/Command/ExportCommand.php
+++ b/Classes/Command/ExportCommand.php
@@ -19,11 +19,16 @@
*/
class ExportCommand extends Command
{
+
+ use FakeRequestTrait;
+
/**
* @return void
*/
public function configure()
{
+ $this->fakeRequest();
+
$description =
'This task can send a mail export with an attachment (XLS or CSV) to a receiver or a group of receivers';
$this->setDescription($description);
@@ -104,7 +109,7 @@ protected function getFilterVariables(int $period): array
if ($period > 0) {
$variables = [
'filter' => [
- 'start' => strftime('%Y-%m-%d %H:%M:%S', (time() - $period)),
+ 'start' => date('Y-m-d H:i:s', (time() - $period)),
'stop' => 'now',
],
];
diff --git a/Classes/Command/FakeRequestTrait.php b/Classes/Command/FakeRequestTrait.php
new file mode 100644
index 000000000..8faf05c90
--- /dev/null
+++ b/Classes/Command/FakeRequestTrait.php
@@ -0,0 +1,23 @@
+withAttribute('applicationType', SystemEnvironmentBuilder::REQUESTTYPE_BE);
+ $GLOBALS['TYPO3_REQUEST'] = $request;
+ }
+ }
+}
diff --git a/Resources/Private/Templates/Module/ExportXls.html b/Resources/Private/Templates/Module/ExportXls.html
index dd43bb8e2..e6daa0576 100644
--- a/Resources/Private/Templates/Module/ExportXls.html
+++ b/Resources/Private/Templates/Module/ExportXls.html
@@ -21,7 +21,7 @@
-
+
@@ -57,7 +57,7 @@
-
+