pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #18884: The CURRENT_TIMESTAMP value being returned in UTC-2.
4+ messages / 4 participants
[nested] [flat]
* BUG #18884: The CURRENT_TIMESTAMP value being returned in UTC-2.
@ 2025-04-08 13:56 PG Bug reporting form <noreply@postgresql.org>
2025-04-08 13:58 ` Re: BUG #18884: The CURRENT_TIMESTAMP value being returned in UTC-2. Test Test <testtest12423@gmail.com>
2025-04-08 14:32 ` Re: BUG #18884: The CURRENT_TIMESTAMP value being returned in UTC-2. Tom Lane <tgl@sss.pgh.pa.us>
2025-04-08 14:44 ` Re: BUG #18884: The CURRENT_TIMESTAMP value being returned in UTC-2. David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 3 replies; 4+ messages in thread
From: PG Bug reporting form @ 2025-04-08 13:56 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: testtest12423@gmail.com
The following bug has been logged on the website:
Bug reference: 18884
Logged by: Test Test
Email address: testtest12423@gmail.com
PostgreSQL version: 17.2
Operating system: Windows
Description:
I hope you are doing well.
When using your postgresql driver, i faced an incosistence behavior.
Query: boolean ret = stat.execute("SELECT CURRENT_TIMESTAMP AS
CURRENT_TIMESTAMP, " +
"CAST(CURRENT_TIMESTAMP as text) AS
CURRENT_TIMESTAMP_TEXT,"
+
" EXTRACT(HOUR FROM CURRENT_TIMESTAMP) AS HOUR FROM
\"Test_Table\"");
CURRENT_TIMESTAMP => is displayed in my TimeZone
CURRENT_TIMESTAMP_TET => is displayed in UTC -02
HOUR => the hour value from UTC-2.
Server Timezone information:
https://monosnap.com/file/rf9QeIGVj9C0lssQa5TRBHYsqISAew
Java Code: https://monosnap.com/file/4cJglQhT5ok9gTdyakxEmt11VlZFUU
However adding the following property in connection URL, changes the
output.
String url = "jdbc:postgresql://127.0.0.1:5432/postgres?loggerLevel=INFO";
Please have a look at the following picture:
https://monosnap.com/file/dWqXiUjggsl6Db29bDr6Q5YAQcQz57
Using another driver, i found from decoding TCP packets that server is
returning CURRENT_TIMESTAMP in UTC -2.
As mentioned server IS in UTC + 2 and not -2.
Can you please let me know your thoughts?
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: BUG #18884: The CURRENT_TIMESTAMP value being returned in UTC-2.
2025-04-08 13:56 BUG #18884: The CURRENT_TIMESTAMP value being returned in UTC-2. PG Bug reporting form <noreply@postgresql.org>
@ 2025-04-08 13:58 ` Test Test <testtest12423@gmail.com>
2 siblings, 0 replies; 4+ messages in thread
From: Test Test @ 2025-04-08 13:58 UTC (permalink / raw)
To: testtest12423@gmail.com; pgsql-bugs@lists.postgresql.org
This issue is not in your Postgres Driver but in Postgres Server.
On Tue, 8 Apr 2025 at 15:57, PG Bug reporting form <noreply@postgresql.org>
wrote:
> The following bug has been logged on the website:
>
> Bug reference: 18884
> Logged by: Test Test
> Email address: testtest12423@gmail.com
> PostgreSQL version: 17.2
> Operating system: Windows
> Description:
>
> I hope you are doing well.
>
> When using your postgresql driver, i faced an incosistence behavior.
>
> Query: boolean ret = stat.execute("SELECT CURRENT_TIMESTAMP AS
> CURRENT_TIMESTAMP, " +
> "CAST(CURRENT_TIMESTAMP as text) AS
> CURRENT_TIMESTAMP_TEXT,"
> +
> " EXTRACT(HOUR FROM CURRENT_TIMESTAMP) AS HOUR FROM
> \"Test_Table\"");
>
> CURRENT_TIMESTAMP => is displayed in my TimeZone
> CURRENT_TIMESTAMP_TET => is displayed in UTC -02
> HOUR => the hour value from UTC-2.
>
> Server Timezone information:
> https://monosnap.com/file/rf9QeIGVj9C0lssQa5TRBHYsqISAew
>
> Java Code: https://monosnap.com/file/4cJglQhT5ok9gTdyakxEmt11VlZFUU
>
> However adding the following property in connection URL, changes the
> output.
> String url = "jdbc:postgresql://127.0.0.1:5432/postgres?loggerLevel=INFO";
>
> Please have a look at the following picture:
> https://monosnap.com/file/dWqXiUjggsl6Db29bDr6Q5YAQcQz57
>
> Using another driver, i found from decoding TCP packets that server is
> returning CURRENT_TIMESTAMP in UTC -2.
>
> As mentioned server IS in UTC + 2 and not -2.
>
> Can you please let me know your thoughts?
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: BUG #18884: The CURRENT_TIMESTAMP value being returned in UTC-2.
2025-04-08 13:56 BUG #18884: The CURRENT_TIMESTAMP value being returned in UTC-2. PG Bug reporting form <noreply@postgresql.org>
@ 2025-04-08 14:32 ` Tom Lane <tgl@sss.pgh.pa.us>
2 siblings, 0 replies; 4+ messages in thread
From: Tom Lane @ 2025-04-08 14:32 UTC (permalink / raw)
To: testtest12423@gmail.com; +Cc: pgsql-bugs@lists.postgresql.org
PG Bug reporting form <noreply@postgresql.org> writes:
> However adding the following property in connection URL, changes the
> output.
> String url = "jdbc:postgresql://127.0.0.1:5432/postgres?loggerLevel=INFO";
The most likely bet is that this is causing the program to connect to
a different server with a different timezone setting.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: BUG #18884: The CURRENT_TIMESTAMP value being returned in UTC-2.
2025-04-08 13:56 BUG #18884: The CURRENT_TIMESTAMP value being returned in UTC-2. PG Bug reporting form <noreply@postgresql.org>
@ 2025-04-08 14:44 ` David G. Johnston <david.g.johnston@gmail.com>
2 siblings, 0 replies; 4+ messages in thread
From: David G. Johnston @ 2025-04-08 14:44 UTC (permalink / raw)
To: testtest12423@gmail.com <testtest12423@gmail.com>; pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
On Tuesday, April 8, 2025, PG Bug reporting form <noreply@postgresql.org>
wrote:
>
>
> As mentioned server IS in UTC + 2 and not -2.
>
I feel there may be confusion as to the directions of plus and minus. The
two time standards have opposite interpretations.
https://www.postgresql.org/docs/current/datetime-posix-timezone-specs.html
David J.
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2025-04-08 14:44 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-04-08 13:56 BUG #18884: The CURRENT_TIMESTAMP value being returned in UTC-2. PG Bug reporting form <noreply@postgresql.org>
2025-04-08 13:58 ` Test Test <testtest12423@gmail.com>
2025-04-08 14:32 ` Tom Lane <tgl@sss.pgh.pa.us>
2025-04-08 14:44 ` David G. Johnston <david.g.johnston@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox