Subject: bin/4925: dhcpd uses bogus time conversions
To: None <>
From: None <>
List: netbsd-bugs
Date: 01/31/1998 17:01:40
>Number:         4925
>Category:       bin
>Synopsis:       dhcpd uses bogus time conversions
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 31 08:05:01 1998
>Originator:     Christos Zoulas
Astron Software
>Release:        Oct 24 1997
System: NetBSD 1.3A NetBSD 1.3A (DIGITAL) #7: Sat Dec 20 18:42:43 EST 1997 i386

	1. The lease date format is bogus. It should not include the
	   weekday! Since it includes the weekday, it uses tm_wday
	   (0-6) so that strftime(3) cannot be used directly (%u is
	   1-7). server/db.c, client/dhclient.c, common/parse.c
	2. parse_date should be using strptime(3) and mktime(3) instead
	   of home-grown inaccurate versions. common/parse.c
	1. remove the weekday from the lease format.
	2. use strptime/strftime/mktime.