mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-27 08:39:28 +08:00
Add additional C comments for to_date/to_char() fixes.
This commit is contained in:
parent
633f2fbd88
commit
2751740ab5
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user