NetBSD Problem Report #482
From gnats Sat Sep 17 15:49:22 1994
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id PAA00177 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sat, 17 Sep 1994 15:49:21 -0700
Message-Id: <199409171937.PAA00802@kolvir.blrc.ma.us>
Date: Sat, 17 Sep 1994 15:37:48 -0400
From: John Kohl <jtk@kolvir.blrc.ma.us>
Reply-To: jtk@kolvir.blrc.ma.us
To: gnats-bugs@NetBSD.ORG
Subject: getty fails to print date properly
X-Send-Pr-Version: 3.2
>Number: 482
>Category: bin
>Synopsis: getty fails to print date properly
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: gnats-admin
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Sep 17 15:50:03 +0000 1994
>Closed-Date: Sun Sep 18 00:15:03 +0000 1994
>Last-Modified:
>Originator: John Kohl
>Release:
>Organization:
>Environment:
System: NetBSD kolvir 1.0_BETA NetBSD 1.0_BETA (KOLVIR) #16: Thu Sep 15 22:03:20 EDT 1994 jtk@kolvir:/u1/NetBSD-1.0/src/sys/arch/i386/compile/KOLVIR i386
>Description:
/usr/libexec/getty doesn't properly interpret the '%d' escape. It tries
to use %P to get AM or PM, but instead all it gets is "P".
>How-To-Repeat:
put %d into your getty im= string, and watch the date come out bogus.
>Fix:
===================================================================
RCS file: RCS/main.c,v
retrieving revision 1.1
diff -c -r1.1 main.c
*** 1.1 1994/09/17 19:31:40
--- main.c 1994/09/17 19:35:15
***************
*** 523,529 ****
break;
case 'd': {
! static char fmt[] = "%l:% %P on %A, %d %B %Y";
fmt[4] = 'M'; /* I *hate* SCCS... */
(void)time(&t);
--- 523,529 ----
break;
case 'd': {
! static char fmt[] = "%l:% %p on %A, %d %B %Y";
fmt[4] = 'M'; /* I *hate* SCCS... */
(void)time(&t);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: mycroft
State-Changed-When: Sat Sep 17 17:15:03 PDT 1994
State-Changed-Why:
Fixed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.