diff --git a/src/PHPTikkie.php b/src/PHPTikkie.php index b75290e..814fa36 100644 --- a/src/PHPTikkie.php +++ b/src/PHPTikkie.php @@ -1,7 +1,9 @@ format('c'); + $params['fromDate'] = (new DateTime())->setTimestamp($fromDate->getTimestamp()) + ->setTimezone(new DateTimeZone('UTC')) + ->format('Y-m-d\TH:i:s\Z'); } if ($toDate) { - $params['toDate'] = $toDate->format('c'); + $params['toDate'] = (new DateTime())->setTimestamp($toDate->getTimestamp()) + ->setTimezone(new DateTimeZone('UTC')) + ->format('Y-m-d\TH:i:s\Z'); } $response = $this->environment->getRequest("/v1/tikkie/platforms/{$platformToken}/users/{$userToken}/paymentrequests", $params);