Content-Length: 261533 | pFad | http://github.com/postgrespro/postgres_cluster/commit/2751740ab5c01b2ffc8afdb86b4c2c2bf37203e0

6B Add additional C comments for to_date/to_char() fixes. · postgrespro/postgres_cluster@2751740 · GitHub
Skip to content

Commit 2751740

Browse files
committed
Add additional C comments for to_date/to_char() fixes.
1 parent 633f2fb commit 2751740

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/utils/adt/formatting.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3504,8 +3504,10 @@ do_to_timestamp(text *date_txt, text *fmt,
35043504
if (tmfc.bc)
35053505
tmfc.cc = -tmfc.cc;
35063506
if (tmfc.cc >= 0)
3507+
/* +1 becuase 21st century started in 2001 */
35073508
tm->tm_year = (tmfc.cc - 1) * 100 + 1;
35083509
else
3510+
/* +1 because year == 599 is 600 BC */
35093511
tm->tm_year = tmfc.cc * 100 + 1;
35103512
}
35113513

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/2751740ab5c01b2ffc8afdb86b4c2c2bf37203e0

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy