Skip to content

Commit

Permalink
fix: adicionando timezone ao buscar a data atual durante verificação …
Browse files Browse the repository at this point in the history
…de vencimento do PIX
  • Loading branch information
devaguia committed Mar 26, 2024
1 parent eac8b68 commit aa6d9c3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/templates/pix-download.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@
<?php echo $subscription['product']; ?>
</span>
<div>
<?php if (new DateTime($subscription['bill']['pix_expiration']) < new DateTime()
&& $key !== 'single_payment') :?>
<?php
$now = new DateTime('now', new DateTimeZone('America/Sao_Paulo'));
$pix_epiration = new DateTime($subscription['bill']['pix_expiration']);

if ($pix_epiration < $now && $key !== 'single_payment') :?>
<div style="display: flex;
flex-direction: column;
align-items: center;
Expand Down

0 comments on commit aa6d9c3

Please sign in to comment.