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

Shlomi
  • 4,708
  • 1
  • 23
  • 32
Jeremy Raines
  • 1,741
  • 3
  • 14
  • 22

1 Answers1

2

Take a look at

postgres default timezone

See what timezone names are understood by the database:

SELECT * FROM pg_timezone_names;
Community
  • 1
  • 1
Jonah Benton
  • 3,598
  • 1
  • 16
  • 27