From owner-freebsd-bugs Tue Oct 13 02:00:11 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA25411 for freebsd-bugs-outgoing; Tue, 13 Oct 1998 02:00:11 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA25393 for ; Tue, 13 Oct 1998 02:00:07 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id CAA24213; Tue, 13 Oct 1998 02:00:02 -0700 (PDT) Received: from ren.dtir.qld.gov.au (ns.dtir.qld.gov.au [203.108.138.66]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA24870 for ; Tue, 13 Oct 1998 01:56:02 -0700 (PDT) (envelope-from syssgm@dtir.qld.gov.au) Received: by ren.dtir.qld.gov.au; id SAA03197; Tue, 13 Oct 1998 18:55:34 +1000 (EST) Received: from ogre.dtir.qld.gov.au(167.123.8.3) by ren.dtir.qld.gov.au via smap (3.2) id xma003189; Tue, 13 Oct 98 18:55:12 +1000 Received: from atlas.dtir.qld.gov.au (atlas.dtir.qld.gov.au [167.123.8.9]) by ogre.dtir.qld.gov.au (8.8.8/8.8.7) with ESMTP id SAA12970 for ; Tue, 13 Oct 1998 18:55:12 +1000 (EST) Received: from nymph.dtir.qld.gov.au (nymph.dtir.qld.gov.au [167.123.10.10]) by atlas.dtir.qld.gov.au (8.8.5/8.8.5) with ESMTP id SAA07669 for ; Tue, 13 Oct 1998 18:55:11 +1000 (EST) Received: (from syssgm@localhost) by nymph.dtir.qld.gov.au (8.8.8/8.8.7) id SAA26209; Tue, 13 Oct 1998 18:55:11 +1000 (EST) (envelope-from syssgm) Message-Id: <199810130855.SAA26209@nymph.dtir.qld.gov.au> Date: Tue, 13 Oct 1998 18:55:11 +1000 (EST) From: Stephen McKay Reply-To: syssgm@dtir.qld.gov.au To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/8300: atq(1) ignores locale Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 8300 >Category: bin >Synopsis: atq(1) ignores locale time info >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 13 02:00:01 PDT 1998 >Last-Modified: >Originator: Stephen McKay >Organization: none >Release: FreeBSD 3.0-CURRENT i386 >Environment: Fairly recent -current. Dual PPro 200. >Description: Only some parts of "at" pay attention to the locale. In particular, listing your queued jobs produces output in the much cursed and completely incomprehensible US date format. Your LANG variable is ignored. >How-To-Repeat: $ at teatime oct 15 echo hello Job 20 will be executed using /bin/sh $ unset LANG $ atq Date Owner Queue Job# 16:00:00 10/15/98 root c 20 $ LANG=en_GB.ISO_8859-1 atq Date Owner Queue Job# 16:00:00 10/15/98 root c 20 $ But after the patch ... $ LANG=en_GB.ISO_8859-1 ./atq Date Owner Queue Job# 16:00:00 15/10/98 root c 20 Actually, I'd prefer: Date Owner Queue Job# 1998-10-15 16:00:00 root c 20 but that's different from just fixing a locale bug. Maybe later. I'll complain about the broken en_AU.ISO_8859-1 locale in a minute... >Fix: This patch works for me. But do we want to just move the setlocale() call that is already there? Can that break anything? I'm keen to commit this as it stands for 3.0. Do I have approval? Index: at.c =================================================================== RCS file: /cvs/src/usr.bin/at/at.c,v retrieving revision 1.13 diff -u -r1.13 at.c --- at.c 1997/03/29 04:27:56 1.13 +++ at.c 1998/10/13 07:27:49 @@ -450,6 +450,10 @@ time_t runtimer; char timestr[TIMESIZE]; int first=1; + +#ifdef __FreeBSD__ + (void) setlocale(LC_TIME, ""); +#endif PRIV_START Stephen. >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message