Re: UUID v7

Поиск
Список
Период
Сортировка
От Andrey Borodin
Тема Re: UUID v7
Дата
Msg-id 9CE1E513-B11A-4C59-980E-D61EC56716E7@yandex-team.ru
обсуждение исходный текст
Ответ на Re: UUID v7  (Andrey Borodin <x4mmm@yandex-team.ru>)
Ответы Re: UUID v7  (Sergey Prokhorenko <sergeyprokhorenko@yahoo.com.au>)
Re: UUID v7  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-hackers

> On 18 Jan 2024, at 20:39, Andrey Borodin <x4mmm@yandex-team.ru> wrote:
>
> But 164555774200000ns after 1582-10-15 00:00:00 UTC  was  2022-02-22 19:22:22 UTC. And that was 2022-02-23 00:22:22
inUTC-05. 


'2022-02-22 19:22:22 UTC' is exactly that moment which was encoded into example UUIDs. It's not '2022-02-23 00:22:22 in
UTC-05'as I thought. 
I got confused by "at timezone" changes which in fact removes timezone information. And that's per SQL standard...

Now I'm completely lost in time... I've set local time to NY (UTC-5).

postgres=# select TIMESTAMP WITH TIME ZONE '2022-02-22 14:22:22-05' - TIMESTAMP WITH TIME ZONE 'Tuesday, February 22,
20222:22:22.00 PM GMT-05:00'; 
 ?column?
----------
 10:00:00
(1 row)

postgres=# select TIMESTAMP WITH TIME ZONE 'Tuesday, February 22, 2022 2:22:22.00 PM GMT-05:00';
      timestamptz
------------------------
 2022-02-22 04:22:22-05
(1 row)

I cannot wrap my mind around it... Any pointers would be appreciated.
I'm certain that code extracted UTC time correctly, I just want a reliable test that verifies timestamp constant (+ I
understandwhat is going on). 


Best regards, Andrey Borodin.


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

Предыдущее
От: Sergey Prokhorenko
Дата:
Сообщение: Re: UUID v7
Следующее
От: Sergey Prokhorenko
Дата:
Сообщение: Re: UUID v7