0

When I set my timezone on my server to UTC via timedatectl set-timezone UTC and restart Postgres server, I can connect via psql and verify that select now() returns the correct value.

When I try to start my Clojure app and run a query, I get the following error:

Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception: org.postgresql.util.PSQLException: FATAL: invalid value for parameter "TimeZone": "UTC"

I am using the following database libraries in my app:

[org.postgresql/postgresql "9.4.1208"]
[clojure.jdbc/clojure.jdbc-c3p0 "0.3.2"]
[org.clojure/java.jdbc "0.6.1"]

The error looks like it comes from Postgres, but only happens when connecting via the Clojure app.

Everything works if I return the OS timezone to America/New_York

1 Answer 1

2

Take a look at

postgres default timezone

See what timezone names are understood by the database:

SELECT * FROM pg_timezone_names;
Sign up to request clarification or add additional context in comments.

1 Comment

This helped me to nail it down -- in my Postgres install, it understands "GMT" and "UCT" but not "UTC"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.