From: | PG Bug reporting form <noreply(at)postgresql(dot)org> |
---|---|
To: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Cc: | stan(at)marencik(dot)cz |
Subject: | BUG #16060: JDBC - badly gets DateOffsetTime value from database |
Date: | 2019-10-15 18:52:12 |
Message-ID: | 16060-de59c53943ddc082@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 16060
Logged by: Jan Marencik
Email address: stan(at)marencik(dot)cz
PostgreSQL version: 12.0
Operating system: Ubuntu
Description:
postgresql 42.2.8
Java DateOffsetTime value correctly stored to database to timestamptz. I see
right conversion to string including right time zone.
Opposite process doesn't get the right DateOffsetTime value from database.
In my case the string representation stored to database is 2019-10-15
20:26:41.391055+02 but I get 2019-10-15T18:26:41.391055Z which doesn't by +2
hours which is my time zone.
I think the bug is in TimestampUtils line 513:
// Postgres is always UTC
OffsetDateTime result = OffsetDateTime.of(ts.year, ts.month, ts.day,
ts.hour, ts.minute, ts.second, ts.nanos, zoneOffset)
.withOffsetSameInstant(ZoneOffset.UTC);
The last line ".withOffsetSameInstant(ZoneOffset.UTC);" is the bug
From | Date | Subject | |
---|---|---|---|
Next Message | Maciek Sakrejda | 2019-10-15 21:11:43 | Duplicate Workers entries in some EXPLAIN plans |
Previous Message | Steven Winfield | 2019-10-15 13:52:52 | RE: BUG #16059: Tab-completion of filenames in COPY commands removes required quotes |