Re: Strange behavior of the timezone

Поиск
Список
Период
Сортировка
От Vlad Alexeenkov
Тема Re: Strange behavior of the timezone
Дата
Msg-id dc665075-cb8a-5577-4edb-73d586e27351@yandex.ru
обсуждение исходный текст
Ответ на Re: Strange behavior of the timezone  (Robert Zenz <robert.zenz@sibvisions.com>)
Ответы Re: Strange behavior of the timezone  (Robert Zenz <robert.zenz@sibvisions.com>)
Список pgsql-admin
On server - UTC
Local - Europe/Moscow

For example, from 1920 all right:

If run in DataGrip:

select '1900-01-01 15:11:10'::timestamp t1, '1900-01-01 
15:11:10'::timestamp at time zone 'Europe/Moscow' as t2

1900-01-01 15:11:10.000000    1900-01-01 12:40:53.000000

select '1920-01-01 15:11:10'::timestamp t1, '1920-01-01 
15:11:10'::timestamp at time zone 'Europe/Moscow' as t2

1920-01-01 15:11:10.000000    1920-01-01 12:11:10.000000

select '1900-01-01 15:11:10'::timestamp t1, '1900-01-01 
15:11:10'::timestamp at time zone 'UTC-3' as t2

1900-01-01 15:11:10.000000    1900-01-01 12:11:10.000000

Thanks

On 27.03.2018 12:46, Robert Zenz wrote:
> That is not necessarily a strange behavior, as the Timezome most likely includes
> all the adjustments that were made in the period of time (leap seconds and the
> like). At least as far as I know.
>
> How does it behave if you try a more current date, like today? What is your
> system/database timezone?
>
>
> On 27.03.2018 11:40, Vlad Alexeenkov wrote:
>> Hi!
>>
>> Can anyone explain this behavior?
>>
>> select '1900-01-01 15:11:10'::timestamp t1, '1900-01-01 15:11:10'::timestamp at
>> time zone 'Europe/Moscow' as t2
>>
>>   t1                                       t2
>> =================== ===================
>> 01.01.1900 15:11:10 01.01.1900 15:40:53
>>
>> Strange behavior of the timezone
>>
>>
>>
>>
>> select version()
>>
>> version
>> ========================================================================================================
>>
>> PostgreSQL 9.6.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623
>> (Red Hat 4.8.5-11), 64-bit
>>
>> Thanks
>>



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

Предыдущее
От: Robert Zenz
Дата:
Сообщение: Re: Strange behavior of the timezone
Следующее
От: Robert Zenz
Дата:
Сообщение: Re: Strange behavior of the timezone