Re: Retrieve the server's time zone - Mailing list pgsql-jdbc

From Thomas Kellerer
Subject Re: Retrieve the server's time zone
Date
Msg-id ov173b$u34$1@blaine.gmane.org
Whole thread Raw
In response to Re: Retrieve the server's time zone  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Responses Re: Retrieve the server's time zone  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Re: Retrieve the server's time zone  (rob stone <floriparob@gmail.com>)
List pgsql-jdbc
Vladimir Sitnikov schrieb am 21.11.2017 um 12:52:
> Could you please clarify what is the case of "receiving server-side time zone"?
> 
> For instance: do you need PostgreSQL time zone or OS time zone?

I need a timestamp in the server's time zone. Or at leas the time zone of 
the OS. The one that is configured for Postgres on the server would do as
well (in my case that is the server's OS time zone)

E.g. 
  select localtimestamp

will return the server's local time converted to the *client's* time zone in JDBC.

In psql however, it does return the timestamp as "seen" by the server. 

I could live with getting the server's OS time zone through "show timezone" 
because then I could convert current_timestamp back to that time zone.

Thomas






pgsql-jdbc by date:

Previous
From: Vladimir Sitnikov
Date:
Subject: Re: Retrieve the server's time zone
Next
From: Vladimir Sitnikov
Date:
Subject: Re: Retrieve the server's time zone