pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: testtest12423@gmail.com
Subject: BUG #18884: The CURRENT_TIMESTAMP value being returned in UTC-2.
Date: Tue, 08 Apr 2025 13:56:57 +0000
Message-ID: <18884-d97000187e523225@postgresql.org> (raw)

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?



view thread (4+ messages)  latest in thread

Message-ID: <18884-d97000187e523225@postgresql.org>
Permalink:  ../18884-d97000187e523225@postgresql.org/
Also on:    postgresql.org/message-id/18884-d97000187e523225@postgresql.org

 · 

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: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, testtest12423@gmail.com
  Subject: Re: BUG #18884: The CURRENT_TIMESTAMP value being returned in UTC-2.
  In-Reply-To: <18884-d97000187e523225@postgresql.org>

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

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