ref: fe02e90431559e9440f10983457eb01eece016c0
parent: ef9e03046d35d4d0a3a73316e4675470228ebc98
author: Naveen Narayanan <[email protected]>
date: Tue Sep 29 07:46:49 EDT 2020
libc: Fix "%C" in strftime.c tm_year represents the number of years since 1900.
--- a/src/libc/time/strftime.c
+++ b/src/libc/time/strftime.c
@@ -252,7 +252,7 @@
width = 4;
goto number;
case 'C':
- val = tm->tm_year / 100;
+ val = (tm->tm_year + 1900) / 100;
goto number;
case 'H':
val = tm->tm_hour;