Skip to content

Commit

Permalink
DateTime format for since because Dinero expects Y-m-d\TH:m:s\Z format
Browse files Browse the repository at this point in the history
  • Loading branch information
kg-bot committed Jul 3, 2019
1 parent 086a70e commit d5282dc
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 d5282dc

Please sign in to comment.