Subject: lib/1860: strftime's %u fmt is two digits wide
To: None <>
From: J.T. Conklin <jtc@NetBSD.ORG>
List: netbsd-bugs
Date: 12/27/1995 19:26:25
>Number:         1860
>Category:       lib
>Synopsis:       strftime's %u fmt is two digits wide
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people (Library Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 27 19:35:02 1995
>Originator:     J.T. Conklin
>Release:        1.1
System: NetBSD 1.0A NetBSD 1.0A (PAIN) #0: Sat Oct 7 08:07:40 EDT 1995 i386

The strftime %u fmt is supposed to be replaced by the weekday (Monday
as the first day of the week) as a decimal number (1-7); but our code
always has a leading 0.

	strftime(buf, sizeof(buf), "%u", tm);
	date +%u