From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118594 invoked by alias); 31 Aug 2016 14:37:03 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 118527 invoked by uid 89); 31 Aug 2016 14:37:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=younger, H*i:sk:dcd35b8, H*f:sk:dcd35b8, H*MI:sk:dcd35b8 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 31 Aug 2016 14:36:52 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EC48A389AD2 for ; Wed, 31 Aug 2016 14:36:50 +0000 (UTC) Received: from [10.3.116.27] (ovpn-116-27.phx2.redhat.com [10.3.116.27]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7VEaoH4025297 for ; Wed, 31 Aug 2016 10:36:50 -0400 Subject: Re: Different representations of time in ls -l and date(1) To: cygwin@cygwin.com References: <860c2a0f5dd46780649de9a26ebc0464@mhoenicka.de> From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg Message-ID: <60d27734-5ce7-6e25-e170-a0baa5442a69@redhat.com> Date: Wed, 31 Aug 2016 15:23:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Nj5xaLHEbhKbL8lSqdCWpH8Fbhc9RIXiX" X-IsSubscribed: yes X-SW-Source: 2016-08/txt/msg00634.txt.bz2 --Nj5xaLHEbhKbL8lSqdCWpH8Fbhc9RIXiX Content-Type: multipart/mixed; boundary="9GColCfXgMp5pUQLjhBPcb1rS2Eucxmgj" From: Eric Blake To: cygwin@cygwin.com Message-ID: <60d27734-5ce7-6e25-e170-a0baa5442a69@redhat.com> Subject: Re: Different representations of time in ls -l and date(1) References: <860c2a0f5dd46780649de9a26ebc0464@mhoenicka.de> In-Reply-To: --9GColCfXgMp5pUQLjhBPcb1rS2Eucxmgj Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 1284 On 08/31/2016 08:04 AM, Frank Farance wrote: > On 2016-08-31 08:09, Markus Hoenicka wrote: >> At 2016-08-31 13:41, Schwarz, Konrad was heard to say: >>> Sorry for the previous incomplete mail. >>> >>> So my problem is that date(1) outputs AM/PM style dates, whereas ls -l >>> uses 24 hour times. >>> >>> $ ls -l rtos_benchmark.lst >>> -rwxr-xr-x+ 1 mchn1350 Domain Users 263 Aug 31 13:14 rtos_benchmark.lst* >>> $ date >>> Wed, Aug 31, 2016 1:39:35 PM >>> $ echo $LC_TIME >>> >>> $ echo $LANG >>> en_US.UTF-8 >>> >>> Shouldn't they be using the same format? Not necessarily. ls hardcodes its default representation for files younger than 6 months to: "%b %e %H:%M" while date hardcodes its default representation to: nl_langinfo(_DATE_FMT) >=20 > Furthermore, I'd say that the default output of "date" should look like > the Linux one, which is the way it has looked on UNIX for about 40 years: >=20 > Linux: Wed Aug 31 08:56:10 EDT 2016 > Cygwin: Wed, Aug 31, 2016 08:54:49 >=20 > In other words, on Cygwin: get rid of the commas, put back the timezone. Sounds like the bug is in cygwin1.dll's nl_langinfo() function for returning a date format with spurious commas. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --9GColCfXgMp5pUQLjhBPcb1rS2Eucxmgj-- --Nj5xaLHEbhKbL8lSqdCWpH8Fbhc9RIXiX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 604 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXxuuCAAoJEKeha0olJ0NqvNsH/RnsGcvM6OdYNLcB2jN10DbZ 20Vj604C7UDI13AcVGaiFmgfj8Ke8cfaNjE4E0QGZIK4NyJidp6pP2SCERQTvzsC NXjdRyj3OJcihKjJGSz4GmVXLnql9i2r9m0XZrbam2CxO+pznDt9aq84o2c5H0/A DMtGygYc4Y529rNyTUXYWedwKGaOACFjtMG75aoqgMXtMhqj+AEfB65WeBGq3s9J ecswHImQ+4NEpYCP5E1bOUinF3OIC1ySiV+6IWBcjbW9G/SQ8XyIU8klDL63izwX AbjVkwE12Qz65HS+Z68H5NCAh/nBwKBEgQM0xpPCZT3fGLZEf8V8f2fTBpTQflM= =1/sK -----END PGP SIGNATURE----- --Nj5xaLHEbhKbL8lSqdCWpH8Fbhc9RIXiX--