Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ian60-0003Uo-LK for pgsql-bugs@arkaria.postgresql.org; Fri, 29 Nov 2019 20:42:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ian5y-0003Nq-CD for pgsql-bugs@arkaria.postgresql.org; Fri, 29 Nov 2019 20:42:30 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ian5y-0003Nj-0e for pgsql-bugs@lists.postgresql.org; Fri, 29 Nov 2019 20:42:30 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ian5u-0006HI-NB for pgsql-bugs@lists.postgresql.org; Fri, 29 Nov 2019 20:42:28 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id xATKgNZM008206; Fri, 29 Nov 2019 15:42:23 -0500 From: Tom Lane To: paul@intekon.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16143: PGTYPEStimestamp_fmt_asc() returns the incorrect month when the format specifier %b is used. In-reply-to: <16143-0d861eb8688d3fef@postgresql.org> References: <16143-0d861eb8688d3fef@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Fri, 29 Nov 2019 19:40:37 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <8204.1575060143.1@sss.pgh.pa.us> Date: Fri, 29 Nov 2019 15:42:23 -0500 Message-ID: <8205.1575060143@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form writes: > PGTYPEStimestamp_fmt_asc() returns the incorrect month when the format > specifier %b is used. Yeah, you're clearly right. Defining struct pg_tm's tm_mon differently from the common understanding of struct tm's tm_mon may not have been the greatest idea we ever had :-(. I dug through the uses of tm_mon in the rest of ecpglib and didn't find any other similar mistakes, though. Will fix, thanks for the report! regards, tom lane