Обсуждение: BUG #1648: ISO Year ignores time zone?

Поиск
Список
Период
Сортировка

BUG #1648: ISO Year ignores time zone?

От
"Nicholas Vinen"
Дата:
The following bug has been logged online:

Bug reference:      1648
Logged by:          Nicholas Vinen
Email address:      hb@pg.x256.org
PostgreSQL version: 8.0.1
Operating system:   Gentoo Linux
Description:        ISO Year ignores time zone?
Details:

rt3=# SELECT to_char(timestamp with time zone '2003-12-31 14:44:44-08', 'Mon
IYYY');
 to_char
----------
 Dec 2004
(1 row)

rt3=# SELECT to_char(timestamp with time zone '2003-12-31 14:44:44-08', 'Mon
YYYY');
 to_char
----------
 Dec 2003
(1 row)

Is that correct? It confused me... there doesn't seem to be a description in
the documentation which mentions IYYY what exactly an ISO year is...

Re: BUG #1648: ISO Year ignores time zone?

От
Tom Lane
Дата:
"Nicholas Vinen" <hb@x256.com> writes:
> rt3=# SELECT to_char(timestamp with time zone '2003-12-31 14:44:44-08', 'Mon
> IYYY');
>  to_char
> ----------
>  Dec 2004
> (1 row)

I believe that's correct.  2003-12-31 falls into the first week of ISO 2004.

            regards, tom lane