pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: davecramer (@davecramer) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] issue #2311: Why is client time zone not configurable?
Date: Wed, 27 Oct 2021 13:01:24 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

Well setting the timezone for the string will have 0 effect on Timestamps without timezones. The server will not change the timezone for those.

```
create table foo (ts timestamp, tz timestamptz);
CREATE TABLE
postgres=# insert into foo values (now(),now());
INSERT 0 1
postgres=# select * from foo;
             ts             |              tz
----------------------------+-------------------------------
 2021-10-27 08:59:21.824902 | 2021-10-27 08:59:21.824902-04
(1 row)

postgres=# set timezone to -5;
SET
postgres=# select * from foo;
             ts             |              tz
----------------------------+-------------------------------
 2021-10-27 08:59:21.824902 | 2021-10-27 07:59:21.824902-05
```

As you can see only the timestamp with time zone changes when I change the session timezone.

I fail to see how setting the session timezone fixes anything for you.

As for your other problem that would be something to discuss with hackers

view thread (57+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: github://pgjdbc/pgjdbc
  Cc: [email protected], [email protected]
  Subject: Re: [pgjdbc/pgjdbc] issue #2311: Why is client time zone not configurable?
  In-Reply-To: <<[email protected]>>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox