X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Message-ID: <1603.81.17.205.14.1218521388.squirrel@webmail2.nebula.fi>
In-Reply-To: <48A12609.C1A1929B@dessent.net>
References: <1454.81.17.205.14.1218517172.squirrel@webmail2.nebula.fi>     <48A12609.C1A1929B@dessent.net>
Date: Tue, 12 Aug 2008 09:09:48 +0300 (EEST)
Subject: Re: changed behaviour in date command
From: "Nicholas Volk" <nvolk@bitlips.fi>
To: cygwin@cygwin.com
User-Agent: SquirrelMail/1.4.10a
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Hi Brian,

Thanks for the reply. I'll switch to %H. My mistake.

br,
  Nicholas

> Nicholas Volk wrote:
>
>> After I updated cygwin today (bash updated) this no longer works as
>> such,
>> because the behaviour of %k has changed: instead of the usual "07" I now
>> get " 7". Is this intentional? At least in my opinion the new behaviour
>> is
>> worse than the original.
>
> The date command is part of coreutils and updating bash should have
> nothing to do with it.
>
>> (The fix itself is easy: tar -jcvf api-`date '+%Y%m%d%k%M' | tr ' '
>> '0'`.tbz files )
>
> Why not just use %H?  The entire purpose of %k as far as I can tell is
> to have an alternative to %H that is space padded instead of zero
> padded.  And %H is standard while %k is a GNU extension.
>
> I spent a little bit of time in gitk trying to see if anything had
> changed recently in coreutils or gnulib, but going all the way back to
> the initial version of lib/strftime.c in gnulib from 1992-11-01, %k has
> always meant a space padded version of %H:
> <http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/strftime.c;h=cc4953e68aaf9bc2cabdc9521ae2d99c220374bf;hb=43e78b970f396160a887c9da94531569faeda8a0>.
>
> Brian
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
>
>



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

