Re: BUG #16143: PGTYPEStimestamp_fmt_asc() returns the incorrect month when the format specifier %b is used.

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: paul@intekon.com
Cc: pgsql-bugs@lists.postgresql.org
Date: 2019-11-29T20:42:23Z
Lists: pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> 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



Commits

  1. Fix off-by-one error in PGTYPEStimestamp_fmt_asc