Skip to content

Commit

Permalink
refactor: remove intermediate variable
Browse files Browse the repository at this point in the history
Co-authored-by: MGatner <mgatner@icloud.com>
  • Loading branch information
kenjis and MGatner committed Nov 4, 2022
1 parent 0faae06 commit 7919dae
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions system/Helpers/date_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ function now(?string $timezone = null): int
$timezone = empty($timezone) ? app_timezone() : $timezone;

if ($timezone === 'local' || $timezone === date_default_timezone_get()) {
$time = Time::now();

return $time->getTimestamp();
return Time::now()->getTimestamp();
}

$time = Time::now($timezone);
Expand Down

0 comments on commit 7919dae

Please sign in to comment.