From: Tom Lane <tgl@sss.pgh.pa.us>
To: Israelins85@yahoo.com.br
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #12367: Wrong result on to_char() when inputing dates
Date: Mon, 29 Dec 2014 09:55:42 -0500
Message-ID: <5680.1419864942@sss.pgh.pa.us> (raw)
In-Reply-To: <20141229031218.8013.51171@wrigleys.postgresql.org>
References: <20141229031218.8013.51171@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Israelins85@yahoo.com.br writes:
> this select shows the diference:
> SELECT
> to_char(('2014-12-28 22:01:39.151-03' AT TIME ZONE 'UTC'),
> 'IYYY-MM-DD"T"HH24:MI:SS.MS"Z"'),
> to_char(('2014-12-28 22:01:39.151-03' AT TIME ZONE 'UTC'),
> 'YYYY-MM-DD"T"HH24:MI:SS.MS"Z"')
The results look correct to me: today is the first day of ISO year
2015. See
http://en.wikipedia.org/wiki/ISO_week_date
The construction IYYY-MM-DD basically never makes any sense. You
should use IYYY with IDDD and/or IW.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, Israelins85@yahoo.com.br
Subject: Re: BUG #12367: Wrong result on to_char() when inputing dates
In-Reply-To: <5680.1419864942@sss.pgh.pa.us>
References: <20141229031218.8013.51171@wrigleys.postgresql.org> <5680.1419864942@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox