fix: return ISO8601 session expire from updateSession by cipheraxat · Pull Request #12891 · appwrite/appwrite · GitHub
Skip to content

fix: return ISO8601 session expire from updateSession - #12891

Merged
Meldiron merged 2 commits into
appwrite:mainfrom
cipheraxat:fix-8447-session-expire-format
Aug 3, 2026
Merged

fix: return ISO8601 session expire from updateSession#12891
Meldiron merged 2 commits into
appwrite:mainfrom
cipheraxat:fix-8447-session-expire-format

Conversation

@cipheraxat

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes #8447 by wrapping expire and providerAccessTokenExpiry with DateTime::formatTz() in PATCH /v1/account/sessions/:sessionId.

Previously, updateSession returned the DB datetime format (Y-m-d H:i:s.v) from DateTime::addSeconds(), while GET session returned ISO8601 via the datetime decode filter. Create-session paths already used formatTz; this aligns update with that pattern so SDK clients can deserialize expire consistently.

Test Plan

  • Updated testRefreshEmailPasswordSession to assert PATCH (and subsequent GET) expire is ISO8601 via DatetimeValidator and Y-m-d\TH:i:s.uP
  • Ran locally: docker compose exec appwrite vendor/bin/phpunit --filter testRefreshEmailPasswordSession (passed)

Related PRs and Issues

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

Wrap expire and providerAccessTokenExpiry with DateTime::formatTz so PATCH /account/sessions matches GET and create-session responses (appwrite#8447).
@greptile-apps

greptile-apps Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

@Meldiron
Meldiron merged commit 100f5e1 into appwrite:main Aug 3, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Bug Report: Session - Expire property format returned is inconsistent

2 participants