scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit fe02e90431559e9440f10983457eb01eece016c0
parent ef9e03046d35d4d0a3a73316e4675470228ebc98
Author: Naveen Narayanan <zerous@simple-cc.org>
Date:   Tue, 29 Sep 2020 11:46:49 +0200

libc: Fix "%C" in strftime.c

tm_year represents the number of years since 1900.

Diffstat:
Msrc/libc/time/strftime.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libc/time/strftime.c b/src/libc/time/strftime.c @@ -252,7 +252,7 @@ strftime(char * restrict s, size_t siz, 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;