| From: | 鄭旭宏 <jesvh(dot)cht(at)gmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: BUG #16472: Bug in to_timestamp ? |
| Date: | 2020-06-02 01:19:32 |
| Message-ID: | CAJsb5a0mUq+Q0DNeMuoNmgSLOOxwq9=KYKc471KQoQP8JVUWGA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
timezone = Asia/Taipei
version = PostgreSQL 9.6rc1, compiled by Visual C++ build 1800, 64-bit
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 於 2020年6月2日 週二 上午12:18寫道:
> Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> writes:
> > On Mon, Jun 1, 2020 at 1:38 PM PG Bug reporting form
> > <noreply(at)postgresql(dot)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
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2020-06-02 01:32:10 | Re: |
| Previous Message | Tom Lane | 2020-06-02 00:56:54 | Re: pgbench bug / limitation |