PostgreSQL does not know the time zone name Europe/Kyiv
ERROR: invalid value for parameter "TimeZone": "Europe/Kyiv"Short answer
The name Europe/Kyiv exists only in IANA time zone data from release 2022b onward. A PostgreSQL server, or a Docker image, built with older data does not list it. Check pg_timezone_names; then update the server's time zone data by upgrading the image or package, or send the older name Europe/Kiev.
Fix it fast
1Find out which cause you have
Ask the server which spelling it knows. If the first query returns no row, the server's time zone data is older than the name.
psql -c "SELECT name FROM pg_timezone_names WHERE name IN ('Europe/Kyiv','Europe/Kiev');"2Match what you see, then jump to its fix
- 1
Europe/Kiev is listed and Europe/Kyiv is notThe server's time zone data is older than release 2022bFix - 2
The server is fine for psql, but an app, driver or PGTZ sends Europe/Kyiv on connectA client sends a name the server does not haveFix - 3
The error appears for one database or role only, or after a config file editA configuration file sets the zone before the data is availableFix
- 1
What does the error look like?
ERROR: invalid value for parameter "TimeZone": "Europe/Kyiv"FATAL: invalid value for parameter "TimeZone": "Europe/Kyiv"
Cause 1 of 3
The server's time zone data is older than release 2022b
1Check
IANA renamed Europe/Kiev to Europe/Kyiv in the 2022b release (10 August 2022). PostgreSQL recognizes only the names in its own time zone files, so a server built before that does not know the new name.
psql -c "SHOW server_version;"
psql -c "SELECT count(*) FROM pg_timezone_names WHERE name = 'Europe/Kyiv';"2Fix
Move to a newer PostgreSQL minor release or image, so the data files are newer. In Docker, pull the current tag and recreate the container; keep the data volume.
docker pull postgres:17
docker compose up -d --force-recreate db3Verify
The same query returns one row, and the session accepts the name.
psql -c "SET TIME ZONE 'Europe/Kyiv'; SHOW TimeZone;"Confirmed by data.iana.org
Cause 2 of 3
A client sends a name the server does not have
1Check
Clients such as libpq read the PGTZ variable and send it to the server on connect. A client that sends the new name to an older server hits the same error.
echo "$PGTZ"
psql -c "SHOW TimeZone;"2Fix
Set the zone to a name that the server lists, until the server is updated.
# only if pg_timezone_names lists Europe/Kiev
export PGTZ=Europe/Kiev
# or per session
# SET TIME ZONE 'Europe/Kiev';3Verify
Reconnect and print the setting.
psql -c "SHOW TimeZone;"Confirmed by postgresql.org
Cause 3 of 3
A configuration file sets the zone before the data is available
1Check
TimeZone can be set in postgresql.conf and in role or database settings. A stored name the server does not recognize gives the same error.
psql -c "SELECT setconfig FROM pg_db_role_setting;"
grep -n "timezone" /var/lib/postgresql/data/postgresql.conf2Fix
Use a name from pg_timezone_names in each place until the server data is updated.
ALTER DATABASE app SET timezone TO 'Europe/Kiev';3Verify
Reconnect to that database and show the setting.
SHOW TimeZone;Confirmed by postgresql.org
How do I stop it coming back?
- Take PostgreSQL minor updates when they ship; time zone files come with them.
- Do not pin a Docker image by an old digest for years.
- Test any new zone name against pg_timezone_names before adding it to a config file.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
Related fixes
Databases
Django cannot connect to PostgreSQL: connection refused on port 5432, locally or in Docker
Is the server running on that host and accepting TCP/IP connections?
Connection refused means nothing accepted the connection at the host and port Django used.
4 causes, each with a fixDatabases
EF Core says 'transient failure' when it cannot reach PostgreSQL in Docker
The query fails only after a delay, because the connection is retried several times
The transient failure message comes from EF Core's retry layer, which hides the underlying connection error.
3 causes, each with a fixDatabases
A Postgres query in Docker fails with: could not resize shared memory segment
ERROR: could not resize shared memory segment: No space left on device
Postgres in a container hands query memory to parallel workers through the container's /dev/shm.
2 causes, each with a fixDatabases
The Postgres container refuses to start: data directory has invalid permissions
mkdir: cannot create directory ‘/home/postgres/pgdata/data’: permission denied
Postgres starts only when its data directory is owned by the server user and closed to everyone else: mode 0700, or 0750 when group read is enabled.
3 causes, each with a fixDatabases
The postgres container exits when ssl=on and a mounted certificate
the container exits a second after docker compose up, and the log names server.crt or server.key
With ssl=on, PostgreSQL refuses to start if it cannot use the certificate and key.
3 causes, each with a fixDatabases
The Postgres container cannot set permissions on a bind-mounted data folder
chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted
Postgres needs its data directory owned by the server user with mode 0700.
3 causes, each with a fix