<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions tagged timezone</title>
<link>https://ask.clojure.org/index.php/tag/timezone</link>
<description>Powered by Question2Answer</description>
<item>
<title>How do I set default JVM options to avoid passing -J arguments to Clojure CLI?</title>
<link>https://ask.clojure.org/index.php/15281/how-set-default-jvm-options-avoid-passing-arguments-clojure</link>
<description>&lt;p&gt;Hello, I have an issue when trying to connect to a recent (v18) postgresql database using next-jdbc. Whenever I try to execute a query I get the following error:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;FATAL: invalid value for parameter &quot;TimeZone&quot;: &quot;America/Buenos_Aires&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is my sample code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(ns app.core
  (:require [next.jdbc :as jdbc]))

(def db
  {:dbtype   &quot;postgresql&quot;
   :dbname   &quot;app&quot;
   :host     &quot;localhost&quot;
   :port     5432
   :user     &quot;app&quot;
  :password &quot;app&quot;})

(def ds (jdbc/get-datasource db))

(defn -main []
  (println &quot;My TZ:&quot;)
  (println (java.time.ZoneId/systemDefault))

  (println &quot;Query:&quot;)
  (println (jdbc/execute! ds [&quot;select current_timestamp&quot;])))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It prints the following text:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;My TZ:
#object[java.time.ZoneRegion 0x5a917723 America/Buenos_Aires]
Execution error (PSQLException) at org.postgresql.core.v3.QueryExecutorImpl/receiveErrorResponse (QueryExecutorImpl.java:2993).
FATAL: invalid value for parameter &quot;TimeZone&quot;: &quot;America/Buenos_Aires&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Debian 13, which is the OS the postgres docker image is based on, has &quot;deprecated&quot; some timezones and moved them to &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.debian.org/releases/trixie/release-notes/issues.es.html#timezones-split-off-into-tzdata-legacy-package&quot;&gt;legacy package&lt;/a&gt;. And it no longer accepts the default Windows timezone (unless the package is installed by modifying the docker image).&lt;/p&gt;
&lt;p&gt;I know I can set the JVM timezone when running the program:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clj -J&quot;-Duser.timezone=America/Argentina/Buenos_Aires&quot; -M -m app.core
My TZ:
#object[java.time.ZoneRegion 0x7e4579c7 America/Argentina/Buenos_Aires]
Query:
[{:current_timestamp #inst &quot;2026-10-29T13:12:23.223933000-00:00&quot;}]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;which works but it&#039;s cumbersome.&lt;/p&gt;
&lt;p&gt;Is there a file I can use to set default JVM options? like jvm.option? I also tried with :jvm-opts inside deps.edn but I don&#039;t really understand how aliases work.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15281/how-set-default-jvm-options-avoid-passing-arguments-clojure</guid>
<pubDate>Thu, 29 Oct 2026 13:16:47 +0000</pubDate>
</item>
</channel>
</rss>