Commit 2751740a authored by Bruce Momjian's avatar Bruce Momjian

Add additional C comments for to_date/to_char() fixes.

parent 633f2fbd
...@@ -3504,8 +3504,10 @@ do_to_timestamp(text *date_txt, text *fmt, ...@@ -3504,8 +3504,10 @@ do_to_timestamp(text *date_txt, text *fmt,
if (tmfc.bc) if (tmfc.bc)
tmfc.cc = -tmfc.cc; tmfc.cc = -tmfc.cc;
if (tmfc.cc >= 0) if (tmfc.cc >= 0)
/* +1 becuase 21st century started in 2001 */
tm->tm_year = (tmfc.cc - 1) * 100 + 1; tm->tm_year = (tmfc.cc - 1) * 100 + 1;
else else
/* +1 because year == 599 is 600 BC */
tm->tm_year = tmfc.cc * 100 + 1; tm->tm_year = tmfc.cc * 100 + 1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment