Skip to content

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

Closed

Description

@pingu2k4

👟 Reproduction steps

When you call Get Session, the expire property is in the format: 2025-07-29T22:11:50.553+00:00. However, when you call Update Session, the format changes to 2025-07-29 22:16:04.780.

For avoidance of doubt, this difference is noticed by calling GET /account/sessions/{sessionId} and PATCH /account/sessions/{sessionId}.

This causes problems that deserialising the json will not always work unless you know to handle it.

👍 Expected behavior

Should always return datetime in the same format (likele the former, for consistency with createdAt and updatedAt)

👎 Actual Behavior

Returned datetime in a different format depending on what operation you are performing

🎲 Appwrite version

Appwrite Cloud

💻 Operating system

Windows

🧱 Your Environment

Creating my own .net SDK, so using REST.

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Activity

  1. added
    bug
    on Jul 29, 2024
  2. abishekgiri commented on Mar 31, 2026

    @abishekgiri

    Hi, I’d like to work on this issue. Could I be assigned?

  3. cipheraxat commented on Jul 15, 2026

    @cipheraxat
    Contributor

    Hi! I'd like to work on this issue. Could I be assigned?

    Root cause: updateSession sets expire (and OAuth providerAccessTokenExpiry) with DateTime::addSeconds() (DB format) and returns that value without DateTime::formatTz(), while GET session returns ISO8601 via the datetime decode filter. I'll match the create-session pattern and add an e2e assertion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions