mirror of
https://github.com/postgres/postgres.git
synced 2026-03-14 22:53:49 -04:00
Add additional C comments for to_date/to_char() fixes.
This commit is contained in:
parent
633f2fbd88
commit
2751740ab5
1 changed files with 2 additions and 0 deletions
|
|
@ -3504,8 +3504,10 @@ do_to_timestamp(text *date_txt, text *fmt,
|
|||
if (tmfc.bc)
|
||||
tmfc.cc = -tmfc.cc;
|
||||
if (tmfc.cc >= 0)
|
||||
/* +1 becuase 21st century started in 2001 */
|
||||
tm->tm_year = (tmfc.cc - 1) * 100 + 1;
|
||||
else
|
||||
/* +1 because year == 599 is 600 BC */
|
||||
tm->tm_year = tmfc.cc * 100 + 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue