Re: Difference in TO_TIMESTAMP results.

From: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
To: prabhat(dot)sahu(at)enterprisedb(dot)com
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Difference in TO_TIMESTAMP results.
Date: 2018-09-18 07:51:28
Message-ID: CAPpHfdsAsF-Ri4zcp0TXpZSPOHGweh9KxKvd=HbixP4MNZ-BHw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 18, 2018 at 8:44 AM Prabhat Sahu
<prabhat(dot)sahu(at)enterprisedb(dot)com> wrote:
>
> I have found below difference in TO_TIMESTAMP results.
>
> postgres[114552]=# select to_timestamp('15-07-1984 23:30:32','dd-mm-yyyy hh24:mi:ss');
> to_timestamp
> ---------------------------
> 1984-07-15 23:30:32+05:30
> (1 row)
>
> postgres[114552]=# select to_timestamp('15-07-84 23:30:32','dd-mm-yyyy hh24:mi:ss');
> to_timestamp
> ------------------------------
> 0084-07-15 23:30:32+05:53:28
> (1 row)
>
> My doubt is the ":28" in timezone part in 2nd result, is it expected ?

Hmm, that looks strange. My first idea was that it's related to
cf984672. But I found that same behavior existed before cf984672.
I'm going to investigate more on that.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Antonin Houska 2018-09-18 08:02:49 Re: [HACKERS] Removing LEFT JOINs in more cases
Previous Message Kyotaro HORIGUCHI 2018-09-18 07:15:42 Re: Problem while setting the fpw with SIGHUP