diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 18b41261d2..a2f8bdf1d1 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -1389,6 +1389,7 @@ App::get('/v1/account/sessions') $session->setAttribute('countryName', $countryName); $session->setAttribute('current', ($current == $session->getId()) ? true : false); + $session->setAttribute('expire', DateTime::formatTz(DateTime::addSeconds(new \DateTime($session->getCreatedAt()), $authDuration))); $sessions[$key] = $session; } diff --git a/tests/e2e/Services/Account/AccountBase.php b/tests/e2e/Services/Account/AccountBase.php index ba751516d3..b08686fa48 100644 --- a/tests/e2e/Services/Account/AccountBase.php +++ b/tests/e2e/Services/Account/AccountBase.php @@ -308,6 +308,7 @@ trait AccountBase $this->assertEquals(true, $response['body']['sessions'][0]['current']); + $this->assertNotFalse(\DateTime::createFromFormat('Y-m-d\TH:i:s.uP', $response['body']['sessions'][0]['expire'])); /** * Test for FAILURE */