Re: BUG #16472: Bug in to_timestamp ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #16472: Bug in to_timestamp ?
Дата
Msg-id 385758.1591028291@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #16472: Bug in to_timestamp ?  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Ответы Re: BUG #16472: Bug in to_timestamp ?  (鄭旭宏 <jesvh.cht@gmail.com>)
Список pgsql-bugs
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



В списке pgsql-bugs по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #16474: Foreign key issue
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #16474: Foreign key issue