Re: [HACKERS] [PATCH] Change missleading comment for tm_mon field of pg_tm structure

2017-01-24 Thread Robert Haas
On Thu, Jan 19, 2017 at 2:52 PM, Dmitry Fedin wrote: > According to usages, tm_mon (month) field has origin 1, not 0. This is > difference from C-library version of struct tm, which has origin 0 for > real. Hmm, thanks for noticing. Looks like it has been wrong for a

[HACKERS] [PATCH] Change missleading comment for tm_mon field of pg_tm structure

2017-01-19 Thread Dmitry Fedin
According to usages, tm_mon (month) field has origin 1, not 0. This is difference from C-library version of struct tm, which has origin 0 for real. For example: ```C if (DateOrder == DATEORDER_DMY) sprintf(str, "%02d/%02d", tm->tm_mday, tm->tm_mon); else sprintf(str, "%02d/%02d",