How can I explicitly set the time zone H2 should use? Now it gets the timezone to use from the underlying OS. I would assume there existed an extra parameter I would add to the connection string ala the one I have below.
db.url=jdbc:h2:mem:mybipper;MVCC=true;<timezone=UTC>
Use the ALTER DATABASE SET TIME_ZONE command to change the time zone of a database. This command takes either a named region such as America/Los_Angeles or an absolute offset from UTC. This example sets the time zone to UTC: ALTER DATABASE SET TIME_ZONE = '+00:00';
sql. Clob ( java. io. Reader is also supported).
Apparently you don't have a parameter on the connection but the database will use the timezone of the JVM where the driver is loaded so you can set -Duser.timezone=UTC
.
Note that you can't change the timezone after the driver has been loaded.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With