timestamps are inconsistent when the timezone set is not UTC
- timestamp without timezone
- timestamp with timezone
Timestamps saved without a timezone, when queried from the API, are returned the in timezone configured, which could be UTC or something else. Timestamps with timezone are saved in UTC and are returned in UTC. This leads to inconsistencies with model timestamps.
Steps to reproduce
- Set GitLab instance to non-UTC timezone such as
gitlab_rails['time_zone'] = 'America/Los_Angeles'and reconfigure
- Using the API, get project events and get a single project.
- Compare timestamp for
What is the current bug behavior?
What is the expected correct behavior?
Timestamps should be consistent
To try to make both timestamps match I tried changing the timezone through
/etc/localtime and setting a
PGTZ env, but the timestamps with a timezone remain in UTC.