Skip to content

[dev container] Postgres database has a different timezone than the server #34

@sandbergja

Description

@sandbergja

From within a dev container today:

opensrf@test:/$ date +"%Z %z"
CST -0600

That is to say, the server's timezone is UTC-6.

However,

evergreen=# SELECT NOW();
              now
-------------------------------
 2025-02-24 15:34:00.300429-05
(1 row)

That is to say, the timezone for postgres is UTC-5, an hour off.

This mismatch caused an incorrect date to appear in the OPAC hold view for me today. I was able to fix it with ALTER DATABASE evergreen SET timezone TO 'America/Chicago'; then restarting OpenSRF drones. I'm not sure if that's the best fix or not, and whatever the best fix is, we should ansible-ize it to make sure that nobody else runs into this confusion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions