Skip to content
This repository has been archived by the owner on Dec 28, 2020. It is now read-only.

Commit

Permalink
Use DateTimeZone objects
Browse files Browse the repository at this point in the history
  • Loading branch information
JochemKlingeler committed Jun 18, 2018
1 parent 719667a commit 2c2a66f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/PHPTikkie.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

use DateTime;
use DateTimeInterface;
use DateTimeZone;
use PHPTikkie\Entities\PaymentRequest;
use PHPTikkie\Entities\Platform;
use PHPTikkie\Entities\User;
Expand Down Expand Up @@ -66,13 +67,13 @@ public function paymentRequests(string $platformToken, string $userToken, int $o

if ($fromDate) {
$params['fromDate'] = (new DateTime())->setTimestamp($fromDate->getTimestamp())
->setTimezone('UTC')
->setTimezone(new DateTimeZone('UTC'))
->format('Y-m-d\TH:i:s\Z');
}

if ($toDate) {
$params['toDate'] = (new DateTime())->setTimestamp($toDate->getTimestamp())
->setTimezone('UTC')
->setTimezone(new DateTimeZone('UTC'))
->format('Y-m-d\TH:i:s\Z');
}

Expand Down

0 comments on commit 2c2a66f

Please sign in to comment.