Postgres adjusts the values for a "timestamp with time zone" (which is what now() returns) to the session's time zone.
This happens on the server (at least by default) and thus SQL Workbench only sees the adjusted value.
I think the JDBC driver honers Java's "user.timezone" and adjusts the session time zone accordingly. But the way you specified that, does not change the "user.timezone" property. It creates a property with the name "time zone".
The syntax "-Duser.timezone=GMT" is intended to be passed on the command line when starting a Java VM.
So you can add -Duser.timezone=GMT to the commandline when you start SQL Workbench (e.g. passing it to the exe)
I think defining that through the extended properties should work, but the property name (left column) has to be "user.timezone" and the value should be "GMT" (without the quotes obviously).
You can also try changing the session time zone directly using,
set timezone='GMT';
If you are dealing with time zones you should add a placeholder for the time zone to the formatting options, e.g. "yyyy-MM-dd HH:mm:ss z",
then the value would be displayed as: e.g. "2018-07-12 12:36:55 GM"
What exactly are you seeing when you run "select now()" in psql?
That should be the same display as in SQL Workbench (at least I tried quite hard to achieve that).
Regards
Thomas
> --
> You received this message because you are subscribed to the Google Groups "SQL Workbench/J - DBMS independent SQL tool" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
sql-workbenc...@googlegroups.com <mailto:
sql-workbenc...@googlegroups.com>.
> For more options, visit
https://groups.google.com/d/optout.