BUG #1648: ISO Year ignores time zone?

Started by Nicholas Vinenalmost 21 years ago2 messagesbugs
Jump to latest
#1Nicholas Vinen
hb@pg.x256.org

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...

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Nicholas Vinen (#1)
Re: BUG #1648: ISO Year ignores time zone?

"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