From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Korotkov <a.korotkov@postgrespro.ru>
Cc: jesvh.cht@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16472: Bug in to_timestamp ?
Date: Mon, 01 Jun 2020 12:18:11 -0400
Message-ID: <385758.1591028291@sss.pgh.pa.us> (raw)
In-Reply-To: <CAPpHfdu-dxL7d45vEuEK7YrL1Jqi-GL+kZprAi9vHXf2N1NKRg@mail.gmail.com>
References: <16472-ab9037fa90ff70f3@postgresql.org>
<CAPpHfdu-dxL7d45vEuEK7YrL1Jqi-GL+kZprAi9vHXf2N1NKRg@mail.gmail.com>
Alexander Korotkov <a.korotkov@postgrespro.ru> writes:
> On Mon, Jun 1, 2020 at 1:38 PM PG Bug reporting form
> <noreply@postgresql.org> wrote:
>> I execute a update SQL as below :
>> update Table1 set date1=to_timestamp('19790701000000', 'YYYYMMDDHH24MISS')
>> where .....
>> date1 is a timestamp type column, the result in DB is 1979-07-01 01:00:00
>> where come from that '01' hour ?
> It's likely related to clock shift in your timezone.
July 1 would be an odd time for a seasonal DST shift ... but quickly
thumbing through the tzdata files, I see one for Asia/Taipei on that date
in 1979. So I guess that the OP is using that zone, and the answer to the
question is "midnight of that date did not exist in Taiwan; their clocks
shifted forward from 23:59:59 to 01:00:00".
regards, tom lane
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: tgl@sss.pgh.pa.us, a.korotkov@postgrespro.ru, jesvh.cht@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16472: Bug in to_timestamp ?
In-Reply-To: <385758.1591028291@sss.pgh.pa.us>
* 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