Subject: Re: bin/36831: rtclocaltime shows negative 0
To: None <gnats-bugs@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: netbsd-bugs
Date: 08/24/2007 19:17:17
On Fri, 24 Aug 2007, zafer@aydogan.de wrote:
> when using rtclocaltime=no in rc.conf and when /etc/localtime links to
> UTC (default), then rc.d prints during boot:
>
> Setting RTC offset to -0.
This is caused by an awk bug, which is reproducible like this:
echo foo | awk '{print (-1 * 0)}'
# prints "-0"; should print "0".
> The patch fixes this. No functional changes, just cosmetics showing 0
> without a negative sign.
Your patch happens to work around the awk bug, but makes the shell script
much harder to understand.
--apb (Alan Barrett)