Skip to content

Commit

Permalink
revert now() adaption
Browse files Browse the repository at this point in the history
  • Loading branch information
alexz707 committed Jan 31, 2025
1 parent 5a681ca commit 8023d17
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Controller/Admin/CustomersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public function downloadFinishedExportAction(Request $request): JsonResponse | R
$filename = sprintf(
'%s-%s-segment-export.%s',
$exporter->getName(),
Carbon::now(date_default_timezone_get())->format('YmdHis'),
Carbon::now()->format('YmdHis'),
$exporter->getExtension()
);

Expand Down
2 changes: 1 addition & 1 deletion src/CustomerView/Customer/Maintenance.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function cleanUpTemporaryCustomers()
// fetch modification date
$date = Carbon::createFromTimestamp($customer->getModificationDate(), date_default_timezone_get());
// if contact is unpublished and last modification was more then 1 day ago
if (!$customer->isPublished() && $date->diffInDays(Carbon::now(date_default_timezone_get())) > 1) {
if (!$customer->isPublished() && $date->diffInDays(Carbon::now()) > 1) {
// delete the customer
$customer->delete();
$changedCounter++;
Expand Down
2 changes: 1 addition & 1 deletion tests/Model/Customer/CustomerListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ public function testDateBetweenFilter()
$dateFilter = new DateBetween(
'birthdate',
Carbon::createFromFormat('Y-m-d', '1970-01-01', date_default_timezone_get()),
Carbon::now(date_default_timezone_get())
Carbon::now()
);
$handler->addFilter($dateFilter);

Expand Down

0 comments on commit 8023d17

Please sign in to comment.