CVS commit: src/lib/libc/time

"Thomas Klausner" <[email protected]>
Newsgroups gmane.os.netbsd.devel.cvs
Message-ID <[email protected]>
Module Name:	src
Committed By:	wiz
Date:		Mon Jun 22 14:37:29 UTC 2026

Modified Files:
	src/lib/libc/time: strptime.c

Log Message:
Fix day of week calculcation in strptime().

The bug was that the calculation used the raw year value without
adding the 1900 offset.

While here, switch to the current Wikipedia version of Gauss' algorithm,
like FreeBSD did, and simplify a loop, like FreeBSD did.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/lib/libc/time/strptime.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.