time -3H
This commit is contained in:
@ -51,9 +51,9 @@ class RedmineService
|
||||
public function majProject(Project $project, string $apiKey, bool $force = false): void
|
||||
{
|
||||
$updatedAt = $project->getUpdateAt();
|
||||
$updatedMinus10 = $updatedAt instanceof \DateTime ? (clone $updatedAt)->sub(new \DateInterval('PT10M')) : null;
|
||||
$updatedMinus3H = $updatedAt instanceof \DateTime ? (clone $updatedAt)->setTimezone(new \DateTimeZone('UTC'))->sub(new \DateInterval('PT3H')) : null;
|
||||
|
||||
$redmine = $this->getProject($project->getId(), $apiKey, $updatedMinus10, $force);
|
||||
$redmine = $this->getProject($project->getId(), $apiKey, $updatedMinus3H, $force);
|
||||
if ($redmine) {
|
||||
$project->setRedmine($redmine);
|
||||
}
|
||||
@ -190,9 +190,9 @@ class RedmineService
|
||||
$this->majProject($project, $apiKey, $force);
|
||||
|
||||
$updatedAt = $project->getUpdateIssuesAt();
|
||||
$updatedMinus10 = $updatedAt instanceof \DateTime ? (clone $updatedAt)->sub(new \DateInterval('PT10M')) : null;
|
||||
$updatedMinus3H = $updatedAt instanceof \DateTime ? (clone $updatedAt)->setTimezone(new \DateTimeZone('UTC'))->sub(new \DateInterval('PT3H')) : null;
|
||||
|
||||
$rissues = $this->getProjectIssues($project->getId(), $apiKey, $force ? null : $updatedMinus10);
|
||||
$rissues = $this->getProjectIssues($project->getId(), $apiKey, $force ? null : $updatedMinus3H);
|
||||
$rissueids = [];
|
||||
foreach ($rissues as $rissue) {
|
||||
array_push($rissueids, $rissue['id']);
|
||||
@ -291,7 +291,6 @@ class RedmineService
|
||||
}
|
||||
|
||||
$url = $this->baseUrl.'/issues.json?'.http_build_query($queryParams);
|
||||
|
||||
$response = $this->client->request('GET', $url, [
|
||||
'headers' => [
|
||||
'X-Redmine-API-Key' => $apiKey,
|
||||
|
Reference in New Issue
Block a user