Skip to content

Commit

Permalink
Merge pull request #6 from Vitexus/DateTimeAsString
Browse files Browse the repository at this point in the history
Allow use of DateTime objects in Timesheet
  • Loading branch information
NikoGrano authored Aug 5, 2021
2 parents 4ccb758 + 386eedd commit ed300cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Api/TimesheetApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -754,14 +754,14 @@ public function apiTimesheetsGetRequest($user = null, $customer = null, $custome
$begin = ObjectSerializer::serializeCollection($begin, '', true);
}
if (null !== $begin) {
$queryParams['begin'] = $begin;
$queryParams['begin'] = ObjectSerializer::toString($begin);
}
// query params
if (\is_array($end)) {
$end = ObjectSerializer::serializeCollection($end, '', true);
}
if (null !== $end) {
$queryParams['end'] = $end;
$queryParams['end'] = ObjectSerializer::toString($end);
}
// query params
if (\is_array($exported)) {
Expand Down Expand Up @@ -796,7 +796,7 @@ public function apiTimesheetsGetRequest($user = null, $customer = null, $custome
$modifiedAfter = ObjectSerializer::serializeCollection($modifiedAfter, '', true);
}
if (null !== $modifiedAfter) {
$queryParams['modified_after'] = $modifiedAfter;
$queryParams['modified_after'] = ObjectSerializer::toString($modifiedAfter);
}

if ($multipart) {
Expand Down
2 changes: 1 addition & 1 deletion src/ObjectSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
class ObjectSerializer
{
/** @var string */
private static $dateTimeFormat = \DateTime::ATOM;
private static $dateTimeFormat = 'Y-m-d\TH:i:s';

/**
* Change the date format.
Expand Down

0 comments on commit ed300cf

Please sign in to comment.