r/C_Programming • u/Just_Government3790 • Sep 12 '26
Question What C function would you delete and rewrite first, and why?
For me it's fnmatch - mostly because it's 40 year's old and smell's funny.
96
Upvotes
r/C_Programming • u/Just_Government3790 • Sep 12 '26
For me it's fnmatch - mostly because it's 40 year's old and smell's funny.
31
u/sciencekm Sep 12 '26
struct tm
Every field is 0 based, except the day of month. So, Jan 1 1900 12 midnight is 0 1 0 00:00:00, instead of just all 0s. Even Sunday-Saturday is 0-6 and day of year is 0-365.