Uso de zona horaria en output de comandos
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
namespace Incoviba\Command\Money;
|
||||
|
||||
use DateTimeImmutable;
|
||||
use DateTimeZone;
|
||||
use Symfony\Component\Console;
|
||||
use Incoviba\Common\Alias\Command;
|
||||
|
||||
@ -14,7 +15,7 @@ class UF extends Command
|
||||
public function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output): int
|
||||
{
|
||||
$this->logger->debug("Running {$this->getName()}");
|
||||
$now = new DateTimeImmutable();
|
||||
$now = new DateTimeImmutable('now', new DateTimeZone($_ENV['TZ'] ?? 'America/Santiago'));
|
||||
$uri = '/api/money/uf';
|
||||
$data = [
|
||||
'fecha' => $now->format('Y-m-d')
|
||||
|
Reference in New Issue
Block a user