From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 4 04:38:43 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5603716A47D for ; Sun, 4 Nov 2007 04:38:42 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.freebsd.org (Postfix) with ESMTP id 9C23313C4A5 for ; Sun, 4 Nov 2007 04:38:39 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id lA44cLMp048765 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 3 Nov 2007 21:38:21 -0700 (PDT) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id lA44cLSd048764; Sat, 3 Nov 2007 21:38:21 -0700 (PDT) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA26398; Sat, 3 Nov 07 20:30:41 PST Date: Sat, 03 Nov 2007 21:29:29 -0700 From: perryh@pluto.rain.com To: bakul@bitblocks.com Message-Id: <472d4aa9.3uhaI9p/nWSuFpCL%perryh@pluto.rain.com> References: <20071104025728.2702A5B29@mail.bitblocks.com> In-Reply-To: <20071104025728.2702A5B29@mail.bitblocks.com> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: timezone printing in date messed up? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Nov 2007 04:38:43 -0000 > > > OS X Leopard has the same bug ... > > > > How did you test it in Leopard? I tried it in Tiger, intending > > to contribute another data point, and I got: > > Leopard's /bin/date accepts -j. You can try compiling FreeBSD > date on Tiger. I had decided against that, since it would propagate the bug if it happened to be in the FreeBSD /bin/date. It turns out the output conversion can be tested using -r: for a in 0 1 2 3 4 5 6 7 8 9 10 11 12 do date -r `expr 1194163200 + 600 \* $a` done and this gives correct results in both Tiger and 6.1: Sun Nov 4 01:00:00 PDT 2007 Sun Nov 4 01:10:00 PDT 2007 Sun Nov 4 01:20:00 PDT 2007 Sun Nov 4 01:30:00 PDT 2007 Sun Nov 4 01:40:00 PDT 2007 Sun Nov 4 01:50:00 PDT 2007 Sun Nov 4 01:00:00 PST 2007 Sun Nov 4 01:10:00 PST 2007 Sun Nov 4 01:20:00 PST 2007 Sun Nov 4 01:30:00 PST 2007 Sun Nov 4 01:40:00 PST 2007 Sun Nov 4 01:50:00 PST 2007 Sun Nov 4 02:00:00 PST 2007 but the original command, run in 6.1, exhibits the bug: for a in 0 1 2 3 4 5 6 7 8 9 10 11 12 do date -j -f %s `expr 1194163200 + 600 \* $a` done Sun Nov 4 01:00:00 PDT 2007 Sun Nov 4 01:10:00 PDT 2007 Sun Nov 4 01:20:00 PDT 2007 Sun Nov 4 01:30:00 PST 2007 Sun Nov 4 01:40:00 PST 2007 Sun Nov 4 01:50:00 PST 2007 Sun Nov 4 01:00:00 PDT 2007 Sun Nov 4 01:10:00 PDT 2007 Sun Nov 4 01:20:00 PDT 2007 Sun Nov 4 01:30:00 PST 2007 Sun Nov 4 01:40:00 PST 2007 Sun Nov 4 01:50:00 PST 2007 Sun Nov 4 02:00:00 PST 2007 Maybe this helps someone familiar with the internals of /bin/date fix it in time for next fall :)