Skip to content

Cipher out of date due to timezone management in postgres db #458

@ChrisFromCnC

Description

@ChrisFromCnC

Self-host installation scripts issue

  • I understand this repository only tracks self-host installation scripts and any other issues should be reported in bitwarden/server

Steps To Reproduce

I have a bitwarden lite version installed with a postgres database.

Part of my postgres is like this
environment:
- POSTGRESQL_PASSWORD_FILE=/run/secrets/pwmgr-postgres-passwd
- TZ=Europe/Paris
- PGTZ=Europe/Paris
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro

Expected Result

I think the issue is that when the GUI (the web, the app or the phone app) is reading date/time is not taking care of timezone.
In my case, we should have the time with timezone.

Actual Result

From now I'm GMT+1, if I edit at 9:12 AM a secret in the vault and save it, I have on bottom of the record in the GUI 9:12
Image
If I looked in the db I see

select "RevisionDate" from "Cipher" where "Id" = 'beec4535-431e-4070-9bbc-b3da01779120';
RevisionDate

2026-01-27 08:12:49.766387+01
(1 row)

which looks ok because I'm GMT+1

but if I want to edit the same record I have a cipher out of date error message.

I locked the vault and go to the same record and see that the edited time is 8:12

Image

Screenshots or Videos

No response

Additional Context

No response

Build Version

2025.12.2

Environment

Self-Hosted

Environment Details

  • Docker with docker compose
  • postgres 18.1

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions