bitwarden / bitwarden/self-host
Cipher out of date due to timezone management in postgres db
- Dominant language
- Shell
- Stars
- 744
- Forks
- 107
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 7
Description
### Self-host installation scripts issue
- [x] 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
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
### 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
- [x] 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.
Contributor guide
Assessment
This issue has not been assessed yet.