From johnp@lodgenet.com  Tue Jun  3 13:43:05 1997
Received: from garbo.lodgenet.com (garbo.lodgenet.com [204.124.122.252])
          by hub.freebsd.org (8.8.5/8.8.5) with SMTP id NAA21696
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 3 Jun 1997 13:43:03 -0700 (PDT)
Received: from daria.lodgenet.com (daria.lodgenet.com [10.0.11.4]) by garbo.lodgenet.com (8.6.12/8.6.9) with ESMTP id PAA31820 for <FreeBSD-gnats-submit@freebsd.org>; Tue, 3 Jun 1997 15:28:16 -0500
Received: (from johnp@localhost) by daria.lodgenet.com (8.8.5/8.6.12) id PAA24281; Tue, 3 Jun 1997 15:28:52 -0500 (CDT)
Message-Id: <199706032028.PAA24281@daria.lodgenet.com>
Date: Tue, 3 Jun 1997 15:28:52 -0500 (CDT)
From: johnp@lodgenet.com
Reply-To: johnp@lodgenet.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: problem with lstart option in `ps'
X-Send-Pr-Version: 3.2

>Number:         3769
>Category:       bin
>Synopsis:       strftime %C should be %c (lstart option)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun  3 13:50:01 PDT 1997
>Closed-Date:    Tue Aug 19 14:53:05 PDT 1997
>Last-Modified:  Tue Aug 19 14:53:29 PDT 1997
>Originator:     1John Prince
>Release:        FreeBSD 2.2.1-RELEASE i386
>Organization:
>Environment:


>Description:
	The ps function has an option lstart. The man page specifies
	that is uses the ``%C'' format described in strftime(3).
	This I believe to be in error since %C refers to century.
	The correct option should be ``%c''.


>How-To-Repeat:
	ps -ax -o pid,lstart,command

>Fix:
        patch for print.c

*** print.c.old Tue Jun  3 14:58:56 1997
--- print.c     Tue Jun  3 14:55:57 1997
***************
*** 402,408 ****
                (void)printf("%-*s", v->width, "-");
                return;
        }
!       (void)strftime(buf, sizeof(buf) -1, "%C",
            localtime(&k->ki_u.u_start.tv_sec));
        (void)printf("%-*s", v->width, buf);
  }
--- 402,408 ----
                (void)printf("%-*s", v->width, "-");
                return;
        }
!       (void)strftime(buf, sizeof(buf) -1, "%c",
            localtime(&k->ki_u.u_start.tv_sec));
        (void)printf("%-*s", v->width, buf);
  }


	
	patch for ps.man1

*** ps.1.old    Tue Jun  3 15:08:34 1997
--- ps.1        Tue Jun  3 15:09:31 1997
***************
*** 217,223 ****
  The soft limit on memory used, specified via a call to
  .Xr setrlimit 2 .
  .It lstart
! The exact time the command started, using the ``%C'' format described in
  .Xr strftime 3 .
  .It nice
  The process scheduling increment (see
--- 217,223 ----
  The soft limit on memory used, specified via a call to
  .Xr setrlimit 2 .
  .It lstart
! The exact time the command started, using the ``%c'' format described in
  .Xr strftime 3 .
  .It nice
  The process scheduling increment (see

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: jlemon 
State-Changed-When: Tue Aug 19 14:53:05 PDT 1997 
State-Changed-Why:  

Fixed, thanks! 
>Unformatted:
