NetBSD Problem Report #7493
Received: (qmail 23086 invoked from network); 29 Apr 1999 03:07:54 -0000
Message-Id: <199904290313.XAA20270@duhnet.net>
Date: Wed, 28 Apr 1999 23:13:13 -0400 (EDT)
From: tv@pobox.com
Reply-To: tv@pobox.com
To: gnats-bugs@gnats.netbsd.org
Subject: strptime(3) does not implement %U and %W
X-Send-Pr-Version: 3.95
>Number: 7493
>Category: lib
>Synopsis: strptime(3) does not implement %U and %W
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Apr 28 20:20:00 +0000 1999
>Closed-Date: Sat Aug 12 03:33:09 +0000 2017
>Last-Modified: Sat Aug 12 03:33:09 +0000 2017
>Originator: Todd Vierling
>Release: 1.4
>Organization:
DuhNet: Pointing out the obvious since 1994.
>Environment:
>Description:
The %U and %W qualifiers for strptime(3) aren't implemented. The UNIX 98
spec is vague on what happens on the borderline weeks, so we probably need
to survey other OS behavior.
>How-To-Repeat:
>Fix:
This PR is here mainly to remind myself to address this at a later date.
But if someone wants to do the grunt work, be my guest. :)
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback
State-Changed-By: mycroft
State-Changed-When: Tue Jul 6 20:01:44 UTC 2004
State-Changed-Why:
AFAICT, this was implemented in 1997.
Responsible-Changed-From-To: lib-bug-people->mycroft
Responsible-Changed-By: mycroft
Responsible-Changed-When: Tue Jul 6 20:01:44 UTC 2004
Responsible-Changed-Why:
.
State-Changed-From-To: feedback->open
State-Changed-By: tv
State-Changed-When: Fri Aug 20 13:57:30 UTC 2004
State-Changed-Why:
No, it's still not implemented. From src/lib/libc/strptime.c rev 1.22:
case 'U': /* The week of year, beginning on sunday. */
case 'W': /* The week of year, beginning on monday. */
LEGAL_ALT(ALT_O);
/*
* XXX This is bogus, as we can not assume any valid
* information present in the tm structure at this
* point to calculate a real value, so just check the
* range for now.
*/
if (!(conv_num(&bp, &i, 0, 53)))
return (0);
break;
From: "Charles M. Hannum" <mycroft@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc: tv@pobox.com, tv@NetBSD.org
Subject: Re: lib/7493
Date: Fri, 20 Aug 2004 14:21:25 +0000
On Friday 20 August 2004 13:58, tv@NetBSD.org wrote:
> Synopsis: strptime(3) does not implement %U and %W
>
> State-Changed-From-To: feedback->open
> State-Changed-By: tv
> State-Changed-When: Fri Aug 20 13:57:30 UTC 2004
> State-Changed-Why:
> No, it's still not implemented. From src/lib/libc/strptime.c rev 1.22:
Uh, it sure seems to me that it outputs a valid week number, e.g. when used
via date(1). It just doesn't range-check carefully.
From: Todd Vierling <tv@duh.org>
To: "Charles M. Hannum" <mycroft@netbsd.org>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: lib/7493
Date: Fri, 20 Aug 2004 10:34:45 -0400 (EDT)
On Fri, 20 Aug 2004, Charles M. Hannum wrote:
> > State-Changed-From-To: feedback->open
> > State-Changed-By: tv
> > State-Changed-When: Fri Aug 20 13:57:30 UTC 2004
> > State-Changed-Why:
> > No, it's still not implemented. From src/lib/libc/strptime.c rev 1.22:
>
> Uh, it sure seems to me that it outputs a valid week number, e.g. when used
> via date(1). It just doesn't range-check carefully.
strftime(3) != strptime(3).
--
-- Todd Vierling <tv@duh.org> <tv@pobox.com>
Responsible-Changed-From-To: mycroft->lib-bug-people
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Sun, 03 Sep 2006 01:17:18 +0000
Responsible-Changed-Why:
Back to role account, mycroft doesn't have commit access any longer.
State-Changed-From-To: open->closed
State-Changed-By: christos@NetBSD.org
State-Changed-When: Fri, 19 Dec 2008 14:58:13 -0500
State-Changed-Why:
fixed a long time ago
State-Changed-From-To: closed->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 14 Feb 2009 20:59:23 +0000
State-Changed-Why:
The code cited by tv@ in 2004 is still there, and as far as I can tell the
comment that says it doesn't work is still valid.
(sigh)
State-Changed-From-To: open->closed
State-Changed-By: ginsbach@NetBSD.org
State-Changed-When: Sat, 12 Aug 2017 03:33:09 +0000
State-Changed-Why:
Changes committed by ginsbach in 2015 make %U and %W work.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.