Skip to content

Commit

Permalink
Merge pull request #8 from kg-bot/master
Browse files Browse the repository at this point in the history
DateTime format for since because Dinero expects Y-m-d\TH:m:s\Z format
  • Loading branch information
LasseRafn authored Jul 3, 2019
2 parents bdd1ba2 + d5282dc commit ad973ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Utils/RequestBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class RequestBuilder

protected $parameters = [];
protected $dateFormat = 'Y-m-d';
protected $dateTimeFormat = 'Y-m-d\TH:m:s\Z';

public function __construct( Builder $builder ) {
$this->parameters['page'] = 0;
Expand Down Expand Up @@ -99,7 +100,7 @@ public function notDeletedOnly() {
* @return $this
*/
public function since( \DateTime $date ) {
$this->parameters['changesSince'] = $date->format( $this->dateFormat );
$this->parameters['changesSince'] = $date->format($this->dateTimeFormat);

return $this;
}
Expand Down

0 comments on commit ad973ca

Please sign in to comment.